home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / tex / tools / lettgf.dtx (.txt) < prev    next >
LaTeX Document  |  1995-11-25  |  103KB  |  2,773 lines

  1. % \OnlyDescription
  2. % \iffalse meta-comment
  3. % Copyright 1995 Gundolf Frank.
  4. % All rights reserved. For further copyright information see the file
  5. % legal.txt, and any other copyright indicated in this file.
  6. %  This system is distributed in the hope that it will be useful,
  7. %  but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. %  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. % IMPORTANT NOTICE:
  10. % For error reports in case of UNCHANGED versions see bugs.txt.
  11. % Please do not request updates from us directly.  Distribution is
  12. % done through Mail-Servers and TeX organizations.
  13. % You are not allowed to change this file.
  14. % You are allowed to distribute this file under the condition that
  15. % it is distributed together with all files mentioned in manifest.txt.
  16. % If you receive only some of these files from someone, complain!
  17. % You are NOT ALLOWED to distribute this file alone.  You are NOT
  18. % ALLOWED to take money for the distribution or use of either this
  19. % file or a changed version, except for a nominal charge for copying
  20. % etc.
  21. % \fi
  22. %\CheckSum{2617}
  23. %% \CharacterTable
  24. %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  25. %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  26. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  27. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  28. %%   Dollar        \$     Percent       \%     Ampersand     \&
  29. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  30. %%   Asterisk      \*     Plus          \+     Comma         \,
  31. %%   Minus         \-     Point         \.     Solidus       \/
  32. %%   Colon         \:     Semicolon     \;     Less than     \<
  33. %%   Equals        \=     Greater than  \>     Question mark \?
  34. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  35. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  36. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  37. %%   Right brace   \}     Tilde         \~}
  38. % \iffalse
  39. % \section{Identification}
  40. %    This document class can only be used with \LaTeXe, so we make
  41. %    sure that an appropriate message is displayed when another \TeX{}
  42. %    format is used.
  43. %    \begin{macrocode}
  44. %<+lettGF>\newcommand{\ClassName}{lettGF}
  45. \newcommand{\Version}{0.91$\beta$}
  46. %<+lettGF>\NeedsTeXFormat{LaTeX2e}[1994/12/01]
  47. %    \end{macrocode}
  48. %    Announce the Class name and its version.
  49. %    \begin{macrocode}
  50. %<+lettGF>\ProvidesClass{\ClassName}
  51. %<10pt>\ProvidesFile{size10.clo}
  52. %<11pt>\ProvidesFile{size11.clo}
  53. %<12pt>\ProvidesFile{size12.clo}
  54. %<leqno>\ProvidesFile{leqno.clo}
  55. %<fleqn>\ProvidesFile{fleqn.clo}
  56. %<*driver>
  57.        \ProvidesFile{lettGF.drv}
  58. %</driver>
  59.               [1995/07/26 v\Version
  60. %<+lettGF>               Extended LaTeX document class from Standard LaTeX document class 'letter'
  61. %<+lettGF>               Written by Gundolf Frank @ AC.Maus.de]
  62. %<10pt|11pt|12pt>      Standard LaTeX file (size option)]
  63. %<leqno>               Standard LaTeX option (left equation numbers)]
  64. %<fleqn>               Standard LaTeX option (flush left equations)]
  65. %    \end{macrocode}
  66. % \section{The documentation driver file}
  67. %    We have our own document class to format the \LaTeXe
  68. %    documentation.
  69. %    \begin{macrocode}
  70. %<*driver>
  71. \documentclass{ltxdoc}
  72. \usepackage{t1enc}
  73. %    \end{macrocode}
  74. %    We don't want everything to appear in the index.
  75. %    \begin{macrocode}
  76. \DoNotIndex{\@M,\@badmath}
  77. \DoNotIndex{\@centercr}
  78. \DoNotIndex{\@empty,\@ignoretrue}
  79. \DoNotIndex{\@ixpt}
  80. \DoNotIndex{\@minus,\@ne,\@plus}
  81. \DoNotIndex{\\,\addtolength}
  82. \DoNotIndex{\advance,\Alph,\alph}
  83. \DoNotIndex{\arabic,\ast,\begin,\begingroup,\bfseries,\bgroup,\box}
  84. \DoNotIndex{\bullet}
  85. \DoNotIndex{\cdot,\cr,\day,\DeclareOption}
  86. \DoNotIndex{\def,\DocInput,\documentclass}
  87. \DoNotIndex{\DoNotIndex,\egroup,\ifx,\else,\fi,\endtrivlist}
  88. \DoNotIndex{\EnableCrossrefs,\end,\end@dblfloat,\end@float,\endgroup}
  89. \DoNotIndex{\endlist,\everycr,\ExecuteOptions}
  90. \DoNotIndex{\filedate,\filename,\fileversion}
  91. \DoNotIndex{\global,\halign,\hangindent,\hbox,\hfil,\hfill,\hrule}
  92. \DoNotIndex{\hsize,\hskip,\hspace,\hss,\ifcase,\or,\fi}
  93. \DoNotIndex{\ifvmode,\fi,\ifnum,\fi,\input}
  94. \DoNotIndex{\kern,\leavevmode,\let,\leftmark}
  95. \DoNotIndex{\list,\llap,\long,\m@ne,\m@th,\mark}
  96. \DoNotIndex{\month,\newcommand,\newcounter,\newenvironment}
  97. \DoNotIndex{\NeedsTeXFormat,\newdimen}
  98. \DoNotIndex{\newpage,\nobreak,\noindent,\number}
  99. \DoNotIndex{\p@}
  100. \DoNotIndex{\pagestyle,\par}
  101. \DoNotIndex{\penalty,\PrintChanges,\PrintIndex,\ProcessOptions}
  102. \DoNotIndex{\protect,\ProvidesClass,\raggedbottom,\raggedright}
  103. \DoNotIndex{\refstepcounter,\relax,\renewcommand,\reset@font}
  104. \DoNotIndex{\rightmargin,\rlap,\rmfamily,\roman}
  105. \DoNotIndex{\roman,\setbox,\setcounter,\setlength}
  106. \DoNotIndex{\skip,\slshape,\space}
  107. \DoNotIndex{\trivlist,\typeout,\tw@}
  108. \DoNotIndex{\vskip,\vspace,\year,\z@}
  109. %    \end{macrocode}
  110. %    We do want an index, using linenumbers
  111. %    \begin{macrocode}
  112. \CodelineNumbered
  113. \CodelineIndex
  114. \EnableCrossrefs
  115. \RecordChanges
  116. %    \end{macrocode}
  117. %    We use so many \file{docstrip} modules that we set the
  118. %    \texttt{StandardModuleDepth} counter to 1.
  119. %    \begin{macrocode}
  120. \setcounter{StandardModuleDepth}{1}
  121. %    \end{macrocode}
  122. %    The following command retrieves the date and version information
  123. %    from the file.
  124. %    \begin{macrocode}
  125. \GetFileInfo{lettGF.drv}
  126. %    \end{macrocode}
  127. %    Some commonly used abbreviations
  128. %    \begin{macrocode}
  129. \newcommand*{\Lopt}[1]{\textsf {#1}}
  130. \newcommand*{\file}[1]{\texttt {#1}}
  131. \newcommand*{\Lcount}[1]{\textsl {\small#1}}
  132. \newcommand*{\pstyle}[1]{\textsl {#1}}
  133. %    \end{macrocode}
  134. %    We also want the full details.
  135. %    \begin{macrocode}
  136. \begin{document}
  137. \DocInput{lettGF.dtx}
  138. \PrintIndex
  139. \PrintChanges
  140. \end{document}
  141. %</driver>
  142. %    \end{macrocode}
  143. % \fi
  144. % \changes{v0.91$\beta$}{1995/8/1}
  145. %   {\\
  146. %    -First version of LettGF.DTX}
  147. % \changes{v0.90$\beta$}{1995/7/26}
  148. %   {\\
  149. %    -First version for \LaTeX2e{}.\\
  150. %    -The most parts work now with the Style 'ifthenelse'.\\
  151. %    -The MultiLetter-function is now more easy and better.\\
  152. %    -And more or less great changes are made with the translation
  153. %     to \LaTeX2e{} (Option DIN (Din $\rightarrow$ a4paper etc.)}
  154. % \changes{v0.61$\beta$}{1994/12/12}
  155. %   {\\
  156. %    -Error in the closingtext corrected.\\
  157. %    -Manual updated.\\
  158. %    -The Style is now shorter.\\
  159. %    -You can search now directly for a address in the datafile.}.
  160. % \changes{v0.60$\beta$}{1994/12/6}
  161. %   {\\
  162. %    -Small error in the signature and picture corrected.\\
  163. %    -The INI-file is now new organised. Different User can use it now.}
  164. % \changes{v0.53$\beta$}{1994/5/2}
  165. %   {\\
  166. %    -At multiletter every letter can get a new closingtext.\\
  167. %    -Faxnumber and email-address are now saved in the data-file.\\
  168. %    -You don't need any \% behind each line in the data-file.}
  169. % \changes{v0.52$\beta$}{1994/2/28}
  170. %   {\\
  171. %    -In the data-file are only three posibilities at contact.\\
  172. %    -Controll output is killed.\\
  173. %    -Small Errors are corrected.}
  174. % \changes{v0.51$\beta$}{1994/2/26}
  175. %   {\\
  176. %    -With Faxoption the total pagenumber is shown.\\
  177. %    -Error with the textlength is corrected.}
  178. % \changes{v0.50$\beta$}{1994/2/24}
  179. %   {\\
  180. %    -First official betaversion.\\
  181. %    -New: Multiletterfunction.}
  182. % \iffalse
  183. % Copyright (C) 1995 Gundolf Frank, all rights reserved.
  184. % \fi
  185. % \author{ Gundolf Frank}
  186. % \title{Extended Letter Document Class for \LaTeX{} version \Version}
  187. % \date{\filedate}
  188. % \maketitle
  189. % \tableofcontents
  190. % \section{Introduction}
  191. %    This \LaTeXe\ package is a reimplementation of
  192. %    \texttt{brief.sty} by my own. It defines the class
  193. %    |\begin{letter}| which produces letter of the current
  194. %    document.
  195. % \section{Copyright and Your Rights}
  196. %    Copyright 1995 Gundolf Frank. All rights reserved.
  197. %    You are not allowed to change this part of the documentation.
  198. %    \subsection{Distribution of unchanged versions:}
  199. %    You are NOT ALLOWED to take money for the distribution or use of
  200. %    these files except for a nominal charge for copying etc.
  201. %    Redistribution of unchanged files is allowed provided that all files
  202. %    listed in the corresponding package README file are distributed
  203. %    including this readme file.
  204. %    If you receive only some of these files from someone, complain!
  205. %    However, if these files are distributed by established suppliers as
  206. %    part of a complete TeX distribution, and the structure of the
  207. %    distribution would make it difficult to distribute the whole set of
  208. %    files, *those parties* are allowed to distribute only some of the
  209. %    files provided that it is made clear that the user will get a
  210. %    complete distribution-set upon request to that supplier (not me).
  211. %    Notice that this permission is not granted to the end user.
  212. %    \subsection{Generation and distribution of changed versions:}
  213. %    The generation of changed versions of the files included in the
  214. %    packages is allowed under the following restrictions:
  215. %    \begin{itemize}
  216. %      \item
  217. %        You rename the file before you make any changes to it.
  218. %      \item
  219. %        You acknowledge the origin of the original version in the file and
  220. %        keep the information that it (or a changed version) has to be
  221. %        distributed under the restrictions mentioned in this file.
  222. %      \item
  223. %        You change the ERROR REPORT address so that we don't get error
  224. %        reports for files *not* maintained by us.
  225. %    \end{itemize}
  226. %    The distribution of changed versions of the files included in the
  227. %    packages is allowed under the following restrictions:
  228. %    \begin{itemize}
  229. %      \item
  230. %        You provide the user with information how to obtain the original
  231. %        package or, even better, distribute it with your files.
  232. %      \item
  233. %        You make sure that the changed versions contain a notice that
  234. %        prevents others to take money for distribution or use of your
  235. %        files, i.e. they have to be distributed under the restrictions
  236. %        mentioned in this file.
  237. %      \item
  238. %        You inform us that you created a changed version of the files.
  239. %        This is only necessary if you want to distribute it to others.
  240. %    \end{itemize}
  241. %    \subsection{Error reports:}
  242. %    Before you report an error please check that
  243. %    \begin{itemize}
  244. %      \item
  245. %        the error is not already mentioned in the *.bug file of the
  246. %        distribution. (In this case it is a feature :-)
  247. %      \item
  248. %        the error isn't caused by obsolete versions of other software;
  249. %        LaTeX from 1986 is a good candidate ...
  250. %      \item
  251. %        you use an original version of the package.
  252. %    \end{itemize}
  253. %    If you think you found a genuine bug please report it together
  254. %    with the following information:
  255. %    \begin{itemize}
  256. %      \item
  257. %        version of the file
  258. %      \item
  259. %        version (date!) of your LaTeX
  260. %      \item
  261. %        a short test file showing the behavior with all unnecessary
  262. %        code removed.
  263. %      \item
  264. %        a transcript (log file) of the session that shows the error.
  265. %    \end{itemize}
  266. %    Please note that it is important to make the file as small as possible
  267. %    to allow us to find and fix the error soon.
  268. %    Error reports in case of UNCHANGED versions to\par
  269. %    \begin{center}
  270. %      \begin{tabular}{ll}
  271. %                            & Gundolf Frank\\
  272. %                            & Triere Str.116\\
  273. %                            & 52078 Aachen\\
  274. %                   Internet:& <gundolf\_frank.ac.maus.de>\\
  275. %                   Mausnet: & Gundolf Frank @ AC\\
  276. %      \end{tabular}
  277. %    \end{center}
  278. %   Please send error reports for contributed files to the original authors.
  279. %   \section{The User Interface}
  280. %   This section defines everything an average user should know.
  281. %   All commands, which you can use in the original style from the \LaTeX
  282. %   3 team, are also available, only more commands are included. You
  283. %   don't have to change anything in your old letters, only the output
  284. %   looks a little bit other.
  285. %   \subsection[\string\bslash\space package\{Multiletter\}]
  286. %            {\bslash package\{MultiLetter\}}
  287. %   The most difference in usage result from the including the package
  288. %   <MultiLetter>, which handeles the addressfiles and of course the
  289. %   multiletter function. So read also the documentation of this file,
  290. %   which desribes the structure of the addressfile.
  291. %   \subsection{The functions of the options}
  292. %   \DeleteShortVerb{\|}
  293. %   \begin{tabular}{|l|p{9cm}|}
  294. %     \hline
  295. %     a4paper        & \\
  296. %     a5paper        & \\
  297. %     b5paper        & \\
  298. %     letterpaper    & \\
  299. %     legalpaper     & \\
  300. %     executivepaper & Chose the papersize.\\
  301. %     \hline
  302. %     landscape      & Switches the values of paperheight and
  303. %                      paperwidth.\\
  304. %     \hline
  305. %     10pt           & \\
  306. %     11pt           & \\
  307. %     12pt           & Coosing the size of the characters.\\
  308. %     \hline
  309. %     leqno          & To put the equation number on the left side of an
  310. %                      equation.\\
  311. %     \hline
  312. %     fleqn          & To get the displayed math environments to print the
  313. %                      contents flush left (with an indentation).\\
  314. %     \hline
  315. %     bank           & Print the bankconnection in the footline.\\
  316. %     \hline
  317. %     address        & Print the fulladdress in the footline.\\
  318. %     \hline
  319. %     noheader       & Print no headline\\
  320. %     \hline
  321. %     fax            & Print on the first page some special fax thinks,
  322. %                      as the total pagenumber and time.\\
  323. %     \hline
  324. %     german         & \\
  325. %     english        & Select the used languages.\\
  326. %     \hline
  327. %   \end{tabular}
  328. %   \MakeShortVerb{\|}
  329. %  \subsection{An example}
  330. %\begin{verbatim}
  331. %  \documentclass[12pt,a4paper,english]{lettgf}
  332. %  \Signature{Zipper}
  333. %  \Fromstreet{Liverpoolstr. 29}
  334. %  \Fromlocation{DF-4567-Birmingthon}
  335. %  \Fromname{Frank Zipper}
  336. %  \begin{document}
  337. %    \begin{letter}[firstname]{Thomas}
  338. %      \opening{}
  339. %      How are you. I write this letter without a special reason.
  340. %      \closing{}
  341. %    \end{letter}
  342. %  \end{document}
  343. %\end{verbatim}
  344. %  In this example any |Frank Zipper| write s a nosense letter to a person
  345. %  with the first name |Thomas|.
  346. %  \subsection[\string\bslash\space begin\{letter\}\{\ldots\}]
  347.               {\bslash begin\{letter\}$[$\#1$]$\{\#2\}}
  348. %  This command begins a letter with the name and the address. The first
  349. %  parameter is the searchoption (e.g. firstname, fax, telephone) and the
  350. %  second parameter the string you search for. The first one is optional.
  351. %  The letter ends with |\end{letter}|.
  352. %  \subsection[\string\bslash\space opening\{\ldots\}\&
  353. %              \string\bslash\space closing\{\ldots\}]
  354. %             {\bslash opening$[$\#1$]$\{\#2\}\&
  355. %              \bslash closing\{\#1\}}
  356. %  |\opening{\ldots}| und |\closing{\ldots}| writes the
  357. %  text of the beginning and of the letter. It also sets the address. The
  358. %  signature is set below the closing text and if you use the fax-option
  359. %  the scanned signature is seted too. In the opening text you can put a
  360. %  abbrevation in the first parameter and also in the closing, e.g.
  361. %  |`Yf'| in the closing text you get |`Yours faithfully'| in the letter.
  362. %  If you want to know more about it look in the source code under
  363. %  option english in the <MultiLetter>-Style.
  364. % \StopEventually{}
  365. %  \section{Loading Packages}
  366. %  The class file needs three additional packages.
  367. %    \begin{macrocode}
  368. %<*lettGF>
  369. \RequirePackage{ifthen}
  370. \RequirePackage{german}
  371. \RequirePackage{MultiLetter}
  372. %    \end{macrocode}
  373. % \section{Initial Code}
  374. %    In this part we define a few commands that are used later on.
  375. % \begin{macro}{\@ptsize}
  376. %    This control sequence is used to store the second digit of the
  377. %    pointsize we are typesetting in. So, normally, it's value is one
  378. %    of 0, 1 or 2.
  379. %    \begin{macrocode}
  380. %<*lettGF>
  381. \newcommand\@ptsize{}
  382. %    \end{macrocode}
  383. % \end{macro}
  384. % \subsection{Setting Paper Sizes}
  385. %    The variables |\paperwidth| and |\paperheight| should reflect the
  386. %    physical paper size after trimming. For desk printer output this
  387. %    is usually the real paper size since there is no post-processing.
  388. %    \begin{macrocode}
  389. \DeclareOption{a4paper}
  390.    {\setlength\paperheight {297mm}%
  391.     \setlength\paperwidth  {210mm}}
  392. \DeclareOption{a5paper}
  393.    {\setlength\paperheight {210mm}%
  394.     \setlength\paperwidth  {148mm}}
  395. \DeclareOption{b5paper}
  396.    {\setlength\paperheight {250mm}%
  397.     \setlength\paperwidth  {176mm}}
  398. \DeclareOption{letterpaper}
  399.    {\setlength\paperheight {11in}%
  400.     \setlength\paperwidth  {8.5in}}
  401. \DeclareOption{legalpaper}
  402.    {\setlength\paperheight {14in}%
  403.     \setlength\paperwidth  {8.5in}}
  404. \DeclareOption{executivepaper}
  405.    {\setlength\paperheight {10.5in}%
  406.     \setlength\paperwidth  {7.25in}}
  407. %    \end{macrocode}
  408. %    The option \Lopt{landscape} switches the values of |\paperheight|
  409. %    and |\paperwidth|, assuming the dimensions wer given for portrait
  410. %    paper.
  411. %    \begin{macrocode}
  412. \DeclareOption{landscape}
  413.    {\setlength\@tempdima   {\paperheight}%
  414.     \setlength\paperheight {\paperwidth}%
  415.     \setlength\paperwidth  {\@tempdima}}
  416. %    \end{macrocode}
  417. % \subsection{Choosing the type size}
  418. %    The type size options are handled by defining |\@ptsize| to
  419. %    contain the last digit of the size in question and branching on
  420. %    |\ifcase| statements. This is done for historical reasons to stay
  421. %    compatible with other packages that use the |\@ptsize| variable
  422. %    to select special actions. It makes the declarations of size
  423. %    options less than 10pt difficult, although one can probably use
  424. %    \texttt{9} and \texttt{8} assuming that a class wont define both
  425. %    \Lopt{8pt} and \Lopt{18pt} options.
  426. %    \begin{macrocode}
  427. \DeclareOption{10pt}{\renewcommand\@ptsize{0}}
  428. \DeclareOption{11pt}{\renewcommand\@ptsize{1}}
  429. \DeclareOption{12pt}{\renewcommand\@ptsize{2}}
  430. %    \end{macrocode}
  431. %  \subsection{Two-side or one-side printing}
  432. %    The option \Lopt{twoside} and option \Lopt{oneside} decide between
  433. %    two-sided or one-sided printing 
  434. %    \begin{macrocode}
  435. \DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}
  436. \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
  437. %    \end{macrocode}
  438. %  \subsection{Draft option}
  439. %    If the user requests \Lopt{draft} we show any overfull boxes.
  440. %    We could probably add some more interesting stuff to this option.
  441. %    \begin{macrocode}
  442. \DeclareOption{draft}{\setlength\overfullrule{5pt}}
  443. \DeclareOption{final}{\setlength\overfullrule{0pt}}
  444. %    \end{macrocode}
  445. %  \subsection{Equation numbering on the left}
  446. %    The option \Lopt{leqno} can be used to get the equation numbers
  447. %    on the left side of the equation.
  448. %    \begin{macrocode}
  449. \DeclareOption{leqno}{\input{leqno.clo}}
  450. %    \end{macrocode}
  451. %  \subsection{Flush left displays}
  452. %    The option \Lopt{fleqn} redefines the displayed math environments
  453. %    in such a way that they come out flush left, with an indentation
  454. %    of |\mathindent| from the prevailing left margin.
  455. %    \begin{macrocode}
  456. \DeclareOption{fleqn}{\input{fleqn.clo}}
  457. %    \end{macrocode}
  458. %  \subsection{Bankconnection}
  459. %    A new if to choose, whether the bankconnection is printed.
  460. %    \begin{macrocode}
  461. \newboolean{bankconnection}
  462. \setboolean{bankconnection}{false}
  463. %    \end{macrocode}
  464. %    The option \Lopt{bank} decide, whether the bankconnection is printed in the
  465. %    footline.
  466. %    \begin{macrocode}
  467. \DeclareOption{bank}{\setboolean{bankconnection}{true}}
  468. %    \end{macrocode}
  469. %  \subsection{Full address}
  470. %    A new if to choose, if the full address is printed.
  471. %    \begin{macrocode}
  472. \newboolean{fulladdress}
  473. \setboolean{fulladdress}{false}
  474. %    \end{macrocode}
  475. %    The option \Lopt{address} decide, whether the full address is printed in the
  476. %    footer.
  477. %    \begin{macrocode}
  478. \DeclareOption{address}{\setboolean{fulladdress}{true}}
  479. %    \end{macrocode}
  480. %  \subsection{No headline}
  481. %    A new if to choose, whether headline is printed.
  482. %    \begin{macrocode}
  483. \newboolean{noheader}
  484. \setboolean{noheader}{false}
  485. %    \end{macrocode}
  486. %    The option \Lopt{fleqn} decide, whether the headline is printed.
  487. %    \begin{macrocode}
  488. \DeclareOption{noheader}{\setboolean{noheader}{true}}
  489. %    \end{macrocode}
  490. %  \subsection{Fax}
  491. %    A new if to choose, whether the letter is printed as fax.
  492. %    \begin{macrocode}
  493. \newboolean{faxpaper}
  494. \setboolean{faxpaper}{false}
  495. %    \end{macrocode}
  496. %    The option \Lopt{fax} decide, whether specialparts of the faxpaper are
  497. %    printed.
  498. %    \begin{macrocode}
  499. \DeclareOption{fax}{\setboolean{faxpaper}{true}}
  500. %    \end{macrocode}
  501. %  \subsection{Languages}
  502. %    In the letter several words appear. They are stored in control sequences 
  503. %    to be able to select a different language.
  504. %  \subsubsection{German}
  505. %  \begin{macrocode}
  506. \DeclareOption{german}
  507.   {\germanTeX
  508.    \xdef\banknamestr{Bank}
  509.    \expandafter\def\csname\banknamestr\endcsname##1
  510.                                        {\def\bankname{##1}}
  511.    \xdef\banknrstr{BLZ}
  512.    \expandafter\def\csname\banknrstr\endcsname##1
  513.                                        {\def\banknr{##1}}
  514.    \xdef\accountnrstr{Kontonummer}
  515.    \expandafter\def\csname\accountnrstr\endcsname##1
  516.                                        {\def\accountnr{##1}}
  517.    \providecommand{\bankconnectionstr}{Bankverbindung}
  518.    \xdef\faxnrstr{Faxnummer}
  519.    \expandafter\def\csname\faxnrstr\endcsname##1
  520.                                        {\def\myfax{##1}}
  521.    \xdef\precodestr{Vorwahl}
  522.    \expandafter\def\csname\precodestr\endcsname##1
  523.                                        {\def\precode{##1}}
  524.    \xdef\telephonestr{Telefonnummer}
  525.    \expandafter\def\csname\telephonestr\endcsname##1
  526.                                        {\def\telephonenum{##1}}
  527.    \providecommand{\emailadrstr}{E-Mail-Adresse}
  528.    \def\EMail##1{\def\myemail{##1}}
  529.    \xdef\fromnamestr{Absendername}
  530.    \expandafter\def\csname\fromnamestr\endcsname##1
  531.                                        {\def\fromname{##1}}
  532.    \xdef\fromstreetstr{Absenderstrasse}
  533.    \expandafter\def\csname\fromstreetstr\endcsname##1
  534.                                        {\def\fromstreet{##1}}
  535.    \xdef\fromlocationstr{Absenderort}
  536.    \expandafter\def\csname\fromlocationstr\endcsname##1
  537.                                        {\def\fromlocation{##1}}
  538.    \xdef\fromsigstr{Unterschrift}
  539.    \expandafter\def\csname\fromsigstr\endcsname##1
  540.                                        {\def\fromsig{##1}}
  541.    \providecommand{\@datelong}{\dategerman}
  542.    \providecommand{\@dateshort}{
  543.       \number\day.\number\month.\number\year}
  544.    \xdef\datestr{Datum}
  545.    \expandafter\def\csname\datestr\endcsname##1{\def\@date{##1}}
  546.    \xdef\timestr{Uhrzeit}
  547.    \expandafter\def\csname\timestr\endcsname##1{\def\@time{##1}}
  548.    \newcommand{\psname}{PS.:}
  549.    \newcommand{\Anlagen}[1]{encl{##1}}
  550.    \newcommand{\Verteiler}[2]{cc{##1}}
  551.    \newcommand{\pagenumstr}{Seitenanzahl}
  552.    \newcommand{\yrefstr}{Ihr Zeichen}
  553.    \newcommand{\mrefstr}{Mein Zeichen}
  554.    \newcommand{\ymaildatestr}{Ihre Nachricht vom}
  555.    \newcommand{\subjectstr}{}
  556.    \newcommand{\Betrifft}[1]{\def\@subject{##1}}
  557.    \newcommand{\Anrede}[2][empty]{\opening[##1]{##2}}
  558.    \newcommand{\Gruss}[1]{\closing{##1}}
  559.    \newcommand{\errormesc}{Es wurde bei \string\begin{letter} ein
  560.                            Suchkriterium\MessageBreak angegeben!}
  561.    \newcommand{\errorhelpc}{Bei \string\begin{letter}[Optionen]
  562.                             {suchkriterium} darf kein Suchkriterium
  563.                             \MessageBreak im Serienbriefmodus
  564.                             angegeben werden.\MessageBreak Meistens
  565.                             bringt Weitercompilien das gew
  566. nschte
  567.                             Ergebnis}
  568. %    \end{macrocode}
  569. %    \subsubsection{English}
  570. %    \begin{macrocode}
  571. \DeclareOption{english}
  572.   {\originalTeX
  573.    \selectlanguage{english}
  574.    \xdef\banknamestr{Bankname}
  575.    \expandafter\def\csname\banknamestr\endcsname##1
  576.                                        {\def\bankname{##1}}
  577.    \xdef\banknrstr{Banknumber}
  578.    \expandafter\def\csname\banknrstr\endcsname##1
  579.                                        {\def\banknr{##1}}
  580.    \xdef\accountnrstr{Accountnumber}
  581.    \expandafter\def\csname\accountnrstr\endcsname##1
  582.                                        {\def\accountnr{##1}}
  583.    \providecommand{\bankconnectionstr}{Bankconnection}
  584.    \xdef\faxnrstr{Faxnumber}
  585.    \expandafter\def\csname\faxnrstr\endcsname##1
  586.                                        {\def\myfax{##1}}
  587.    \xdef\precodestr{Precode}
  588.    \expandafter\def\csname\precodestr\endcsname##1
  589.                                        {\def\precode{##1}}
  590.    \xdef\telephonestr{Telephonenumber}
  591.    \expandafter\def\csname\telephonestr\endcsname##1
  592.                                        {\def\telephonenum{##1}}
  593.    \providecommand{\emailadrstr}{Email-address}
  594.    \def\email##1{\def\myemail{##1}}
  595.    \xdef\fromnamestr{Sendername}
  596.    \expandafter\def\csname\fromnamestr\endcsname##1
  597.                                        {\def\fromname{##1}}
  598.    \xdef\fromstreetstr{Senderstreet}
  599.    \expandafter\def\csname\fromstreetstr\endcsname##1
  600.                                        {\def\fromstreet{##1}}
  601.    \xdef\fromlocationstr{Senderlocation}
  602.    \expandafter\def\csname\fromlocationstr\endcsname##1
  603.                                        {\def\fromlocation{##1}}
  604.    \xdef\fromsigstr{Signature}
  605.    \expandafter\def\csname\fromsigstr\endcsname##1
  606.                                        {\def\fromsig{##1}}
  607.    \providecommand{\@datelong}{\dateenglish}
  608.    \providecommand{\@dateshort}{
  609.       \number\day.\number\month.\number\year}
  610.    \xdef\datestr{Date}
  611.    \expandafter\def\csname\datestr\endcsname##1
  612.                                        {\def\@date{##1}}
  613.    \xdef\timestr{Time}
  614.    \expandafter\def\csname\timestr\endcsname##1
  615.                                        {\def\@time{##1}}
  616.    \newcommand{\psname}{PS.:}
  617.    \newcommand{\pagenumstr}{Pages}
  618.    \newcommand{\yrefstr}{Your sign}
  619.    \newcommand{\mrefstr}{My sign}
  620.    \newcommand{\ymaildatestr}{Yout mail from}
  621.    \newcommand{\subjectstr}{}
  622.    \newcommand{\subject}[1]{\def\@subject{##1}}
  623.    \newcommand{\errormesc}{There is a search option at
  624.                            \string\begin{letter}[options]
  625.                            {search options}!}
  626.    \newcommand{\errorhelpc}{At \string\begin{letter}[options]
  627.                             {search option} isn't a search option
  628.                             allowed\MessageBreak in the
  629.                             multiletter-mode.}
  630. %    \end{macrocode}
  631. % \section{Executing Options}
  632. %    Here we execute the default options to initialize certain
  633. %    variables.
  634. %    \begin{macrocode}
  635. \ExecuteOptions{a4paper,12pt,oneside,onecolumn,final}
  636. %    \end{macrocode}
  637. %    The |\ProcessOptions| command causes the execution of the code
  638. %    for every option \Lopt{foo} which is declared and for which the
  639. %    user typed the \Lopt{foo} option in his |\documentclass| command.
  640. %    For every option \Lopt{bar} he typed, which is not declared, the
  641. %    option is assumed to be a global option.  All options will be
  642. %    passed as document options to any |\usepackage| command in the
  643. %    document preamble.
  644. %    \begin{macrocode}
  645. \ProcessOptions
  646. %    \end{macrocode}
  647. %    Now that all the options have been executed we can load the
  648. %    chosen class option file that contains all size dependant code.
  649. %    \begin{macrocode}
  650. \input{size1\@ptsize.clo}
  651. %    \end{macrocode}
  652. % \section{Document Layout}
  653. % \label{sec:maincode}
  654. %  In this section we are finally dealing with the nasty typographical
  655. %  details.
  656. % \subsection{Fonts}
  657. %    \LaTeX\ offers the user commands to change the size of the font,
  658. %    relative to the `main' size. Each relative size changing command
  659. %    |\size| executes the command
  660. %    |\@setfontsize||\size|\meta{font-size}\meta{baselineskip} where:
  661. %    \begin{description}
  662. %    \item[\meta{font-size}] The absolute size of the font to use from
  663. %        now on.
  664. %    \item[\meta{baselineskip}] The normal value of |\baselineskip|
  665. %        for the size of the font selected. (The actual value will be
  666. %        |\baselinestretch| * \meta{baselineskip}.)
  667. %    \end{description}
  668. %    A number of commands, defined in the \LaTeX{} kernel, shorten the
  669. %    following  definitions and are used throughout. They are:
  670. % \begin{center}
  671. % \begin{tabular}{ll@{\qquad}ll@{\qquad}ll}
  672. %  \verb=\@vpt= & 5 & \verb=\@vipt= & 6 & \verb=\@viipt= & 7 \\
  673. %  \verb=\@viiipt= & 8 & \verb=\@ixpt= & 9 & \verb=\@xpt= & 10 \\
  674. %  \verb=\@xipt= & 10.95 & \verb=\@xiipt= & 12 & \verb=\@xivpt= & 14.4\\
  675. %  ...
  676. %  \end{tabular}
  677. %  \end{center}
  678. % \begin{macro}{\normalsize}
  679. % \begin{macro}{\@normalsize}
  680. %    The user level command for the main size is |\normalsize|.
  681. %    Internally \LaTeX{} uses |\@normalsize| when it refers to the
  682. %    main size. |\@normalsize| will be defined to work like
  683. %    |\normalsize| if the latter is redefined from its default
  684. %    definition (that just issues an error message). Otherwise
  685. %    |\@normalsize| simply selects a 10pt/12pt size.
  686. %    The |\normalsize| macro also sets new values for\\
  687. %    |\abovedisplayskip|, |\abovedisplayshortskip| and
  688. %    |\belowdisplayshortskip|.
  689. %    \begin{macrocode}
  690. %<*10pt|11pt|12pt>
  691. \renewcommand{\normalsize}{%
  692. %<*10pt>
  693.    \@setfontsize\normalsize\@xpt\@xiipt
  694.    \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
  695.    \abovedisplayshortskip \z@ \@plus3\p@
  696.    \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
  697. %</10pt>
  698. %<*11pt>
  699.    \@setfontsize\normalsize\@xipt{13.6}%
  700.    \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
  701.    \abovedisplayshortskip \z@ \@plus3\p@
  702.    \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
  703. %</11pt>
  704. %<*12pt>
  705.    \@setfontsize\normalsize\@xiipt{14.5}%
  706.    \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
  707.    \abovedisplayshortskip \z@ \@plus3\p@
  708.    \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
  709. %</12pt>
  710. %    \end{macrocode}
  711. %    The |\belowdisplayskip| is always equal to the
  712. %    |\abovedisplayskip|. The parameters of the first level list are
  713. %    always given by |\@listI|.
  714. %    \begin{macrocode}
  715.    \belowdisplayskip \abovedisplayskip
  716.    \let\@listi\@listI}
  717. %    \end{macrocode}
  718. %    We initially choose the normalsize font.
  719. %    \begin{macrocode}
  720. \normalsize
  721. %    \end{macrocode}
  722. % \end{macro}
  723. % \end{macro}
  724. % \begin{macro}{\small}
  725. %    This is similar to |\normalsize|.
  726. %    \begin{macrocode}
  727. \newcommand{\small}{%
  728. %<*10pt>
  729.    \@setfontsize\small\@ixpt{11}%
  730.    \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
  731.    \abovedisplayshortskip \z@ \@plus2\p@
  732.    \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
  733.    \def\@listi{\leftmargin\leftmargini
  734.                \topsep 4\p@ \@plus2\p@ \@minus2\p@
  735.                \parsep 2\p@ \@plus\p@ \@minus\p@
  736.                \itemsep \parsep}%
  737. %</10pt>
  738. %<*11pt>
  739.    \@setfontsize\small\@xpt\@xiipt
  740.    \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
  741.    \abovedisplayshortskip \z@ \@plus3\p@
  742.    \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
  743.    \def\@listi{\leftmargin\leftmargini
  744.                \topsep 6\p@ \@plus2\p@ \@minus2\p@
  745.                \parsep 3\p@ \@plus2\p@ \@minus\p@
  746.                \itemsep \parsep}%
  747. %</11pt>
  748. %<*12pt>
  749.    \@setfontsize\small\@xipt{13.6}%
  750.    \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@
  751.    \abovedisplayshortskip \z@ \@plus3\p@
  752.    \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
  753.    \def\@listi{\leftmargin\leftmargini
  754.                \topsep 9\p@ \@plus3\p@ \@minus5\p@
  755.                \parsep 4.5\p@ \@plus2\p@ \@minus\p@
  756.                \itemsep \parsep}%
  757. %</12pt>
  758.    \belowdisplayskip \abovedisplayskip
  759. %    \end{macrocode}
  760. % \end{macro}
  761. % \begin{macro}{\footnotesize}
  762. %    This is similar to |\normalsize|.
  763. %    \begin{macrocode}
  764. \newcommand{\footnotesize}{%
  765. %<*10pt>
  766.    \@setfontsize\footnotesize\@viiipt{9.5}%
  767.    \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
  768.    \abovedisplayshortskip \z@ \@plus\p@
  769.    \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
  770.    \def\@listi{\leftmargin\leftmargini
  771.                \topsep 3\p@ \@plus\p@ \@minus\p@
  772.                \parsep 2\p@ \@plus\p@ \@minus\p@
  773.                \itemsep \parsep}%
  774. %</10pt>
  775. %<*11pt>
  776.    \@setfontsize\footnotesize\@ixpt{11}%
  777.    \abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@
  778.    \abovedisplayshortskip \z@ \@plus\p@
  779.    \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
  780.    \def\@listi{\leftmargin\leftmargini
  781.                \topsep 4\p@ \@plus2\p@ \@minus2\p@
  782.                \parsep 2\p@ \@plus\p@ \@minus\p@
  783.                \itemsep \parsep}%
  784. %</11pt>
  785. %<*12pt>
  786.    \@setfontsize\footnotesize\@xpt\@xiipt
  787.    \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
  788.    \abovedisplayshortskip \z@ \@plus3\p@
  789.    \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
  790.    \def\@listi{\leftmargin\leftmargini
  791.                \topsep 6\p@ \@plus2\p@ \@minus2\p@
  792.                \parsep 3\p@ \@plus2\p@ \@minus\p@
  793.                \itemsep \parsep}%
  794. %</12pt>
  795.    \belowdisplayskip \abovedisplayskip
  796. %</10pt|11pt|12pt>
  797. %    \end{macrocode}
  798. % \end{macro}
  799. % \begin{macro}{\scriptsize}
  800. % \begin{macro}{\tiny}
  801. % \begin{macro}{\large}
  802. % \begin{macro}{\Large}
  803. % \begin{macro}{\LARGE}
  804. % \begin{macro}{\huge}
  805. % \begin{macro}{\Huge}
  806. %    These are all much simpler than the previous macros, they just
  807. %    select a new fontsize, but leave the parameters for displays and
  808. %    lists alone.
  809. %    \begin{macrocode}
  810. %<*10pt>
  811. \newcommand{\scriptsize}{\@setfontsize\scriptsize\@viipt\@viiipt}
  812. \newcommand{\tiny}{\@setfontsize\tiny\@vpt\@vipt}
  813. \newcommand{\large}{\@setfontsize\large\@xiipt{14}}
  814. \newcommand{\Large}{\@setfontsize\Large\@xivpt{18}}
  815. \newcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{22}}
  816. \newcommand{\huge}{\@setfontsize\huge\@xxpt{25}}
  817. \newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{30}}
  818. %</10pt>
  819. %<*11pt>
  820. \newcommand{\scriptsize}{\@setfontsize\scriptsize\@viiipt{9.5}}
  821. \newcommand{\tiny}{\@setfontsize\tiny\@vipt\@viipt}
  822. \newcommand{\large}{\@setfontsize\large\@xiipt{14}}
  823. \newcommand{\Large}{\@setfontsize\Large\@xivpt{18}}
  824. \newcommand{\LARGE}{\@setfontsize\LARGE\@xviipt{22}}
  825. \newcommand{\huge}{\@setfontsize\huge\@xxpt{25}}
  826. \newcommand{\Huge}{\@setfontsize\Huge\@xxvpt{30}}
  827. %</11pt>
  828. %<*12pt>
  829. \newcommand{\scriptsize}{\@setfontsize\scriptsize\@viiipt{9.5}}
  830. \newcommand{\tiny}{\@setfontsize\tiny\@vipt\@viipt}
  831. \newcommand{\large}{\@setfontsize\large\@xivpt{18}}
  832. \newcommand{\Large}{\@setfontsize\Large\@xviipt{22}}
  833. \newcommand{\LARGE}{\@setfontsize\LARGE\@xxpt{25}}
  834. \newcommand{\huge}{\@setfontsize\huge\@xxvpt{30}}
  835. \let\Huge=\huge
  836. %</12pt>
  837. %    \end{macrocode}
  838. % \end{macro}
  839. % \end{macro}
  840. % \end{macro}
  841. % \end{macro}
  842. % \end{macro}
  843. % \end{macro}
  844. % \end{macro}
  845. % \subsection{Paragraphing}
  846. % \begin{macro}{\lineskip}
  847. % \begin{macro}{\normallineskip}
  848. %    These parameters control \TeX's behavior when two lines tend to
  849. %    come too close together.
  850. %    \begin{macrocode}
  851. \setlength\lineskip{1\p@}
  852. \setlength\normallineskip{1\p@}
  853. %    \end{macrocode}
  854. % \end{macro}
  855. % \end{macro}
  856. % \begin{macro}{\baselinestretch}
  857. %    This is used as a multiplier for |\baselineskip|. The default is
  858. %    to {\em not\/} stretch the baselines.
  859. %    \begin{macrocode}
  860. \renewcommand\baselinestretch{}
  861. %    \end{macrocode}
  862. % \end{macro}
  863. % \begin{macro}{\parskip}
  864. % \begin{macro}{\parindent}
  865. %    |\parskip| gives extra vertical space between paragraphs and
  866. %    |\parindent| is the width of the paragraph indentation.
  867. %    Letters are typeset without paragraph indentation.
  868. %    \begin{macrocode}
  869. \setlength\parskip{0.7em}
  870. \setlength\parindent{0\p@}
  871. %    \end{macrocode}
  872. % \end{macro}
  873. % \end{macro}
  874. % \begin{macro}{\@lowpenalty}
  875. % \begin{macro}{\@medpenalty}
  876. % \begin{macro}{\@highpenalty}
  877. %    The commands |\nopagebreak| and |\nolinebreak| put in penalties
  878. %    to discourage these breaks at the point they are put in.
  879. %    They use |\@lowpenalty|, |\@medpenalty| or |\@highpenalty|,
  880. %    dependant on their argument.
  881. %    \begin{macrocode}
  882. \@lowpenalty   51
  883. \@medpenalty  151
  884. \@highpenalty 301
  885. %    \end{macrocode}
  886. % \end{macro}
  887. % \end{macro}
  888. % \end{macro}
  889. % \begin{macro}{\clubpenalty}
  890. % \begin{macro}{\widowpenalty}
  891. %    These penalties are used to discourage club and widow lines.
  892. %    Because we use their default values we only show them here,
  893. %    commented out.
  894. %    \begin{macrocode}
  895. % \clubpenalty  150
  896. % \widowpenalty 150
  897. %    \end{macrocode}
  898. % \end{macro}
  899. % \end{macro}
  900. % \begin{macro}{\displaywidowpenalty}
  901. % \begin{macro}{\predisplaypenalty}
  902. % \begin{macro}{\postdisplaypenalty}
  903. %    Discourage (but not so much) widows in front of a math display
  904. %    and forbid breaking directly in front of a display. Allow break
  905. %    after a display without a penalty. Again the default values are
  906. %    used, therefore we only show them here.
  907. %    \begin{macrocode}
  908. % \displaywidowpenalty 50
  909. % \predisplaypenalty   10000
  910. % \postdisplaypenalty  0
  911. %    \end{macrocode}
  912. % \end{macro}
  913. % \end{macro}
  914. % \end{macro}
  915. % \begin{macro}{\interlinepenalty}
  916. %    Allow the breaking of a page in the middle of a paragraph.
  917. %    \begin{macrocode}
  918. % \interlinepenalty 0
  919. %    \end{macrocode}
  920. % \end{macro}
  921. % \begin{macro}{\brokenpenalty}
  922. %    We allow the breaking of a page after a hyphenated line.
  923. %    \begin{macrocode}
  924. % \brokenpenalty 0
  925. %</lettGF>
  926. %    \end{macrocode}
  927. % \end{macro}
  928. % \subsection{Page Layout}
  929. %    All margin dimensions are measured from a point one inch from the
  930. %    top and lefthand side of the page.
  931. % \subsubsection{Vertical spacing}
  932. % \begin{macro}{\headheight}
  933. % \begin{macro}{\headsep}
  934. %    The |\headheight| is the height of the box that will contain the
  935. %    running head. The |\headsep| is the distance between the bottom
  936. %    of the running head and the top of the text. |\topskip| is the
  937. %    |\baselineskip| for the first line on a page, its value depends
  938. %    on the size option that was specified. Therefore it is
  939. %    initialized in one of the \file{size1x.clo} files.
  940. %    \LaTeX's output routine will not work properly if it has the
  941. %    value 0pt, so do not do that!
  942. %    \begin{macrocode}
  943. %<*10pt|11pt|12pt>
  944. \setlength\headheight{12\p@}
  945. \setlength\headsep   {45\p@}
  946. %<10pt>\setlength\topskip   {10\p@}
  947. %<11pt>\setlength\topskip   {11\p@}
  948. %<12pt>\setlength\topskip   {12\p@}
  949. %    \end{macrocode}
  950. % \end{macro}
  951. % \end{macro}
  952. % \begin{macro}{\footskip}
  953. %    The distance from the baseline of the box which contains the
  954. %    running footer to the baseline of last line of text is controlled
  955. %    by the |\footskip|.
  956. %    Bottom of page:
  957. %    \begin{macrocode}
  958. \setlength\footskip{25\p@}
  959. %    \end{macrocode}
  960. % \end{macro}
  961. % \begin{macro}{\maxdepth}
  962. % \begin{macro}{\@maxdepth}
  963. %    The \TeX\ primitive register |\maxdepth| has a function that is
  964. %    similar to that of |\topskip|. The register |\@maxdepth| should
  965. %    always contain a copy of |\maxdepth|. In both plain \TeX\ and
  966. %    \LaTeX~2.09 |\maxdepth| had a fixed value of \texttt{4pt}; in
  967. %    native \LaTeX2e\ mode we let the value depend on the typesize. We
  968. %    set it so that |\maxdepth| $+$ |\topskip| $=$ typesize $\times
  969. %    1.5$. As it happens, in these classes |\topskip| is equal to the
  970. %    typesize, therefor we set |\maxdepth| to half the value of
  971. %    |\topskip|.
  972. %    \begin{macrocode}
  973. \setlength\maxdepth{.5\topskip}
  974. \setlength\@maxdepth\maxdepth
  975. %    \end{macrocode}
  976. % \end{macro}
  977. % \end{macro}
  978. % \subsubsection{The dimension of text}
  979. % \begin{macro}{\textwidth}
  980. %    First, we calculate the maximum |\textwidth|, which we will allow
  981. %    on the selected paper and store it in |\@tempdima|. Then we store
  982. %    the length of a line with approximately 60--70 characters in
  983. %    |\@tempdimb|. The values given are more or less suitable when
  984. %    Computer Modern fonts are used.
  985. %    \begin{macrocode}
  986.   \setlength\@tempdima{\paperwidth}
  987.   \addtolength\@tempdima{-2in}
  988. %<10pt>  \setlength\@tempdimb{345\p@}
  989. %<11pt>  \setlength\@tempdimb{360\p@}
  990. %<12pt>  \setlength\@tempdimb{390\p@}
  991. %    \end{macrocode}
  992. %    Now we can set the |\textwidth|, depending on whether we will be
  993. %    setting one or two columns.
  994. %    In two column mode each {\em column} shouldn't be wider than
  995. %    |\@tempdimb| (which could happen on \textsc{a3} paper for
  996. %    instance).
  997. %    \begin{macrocode}
  998.   \if@twocolumn
  999.     \ifdim\@tempdima>2\@tempdimb\relax
  1000.       \setlength\textwidth{2\@tempdimb}
  1001.     \else
  1002.       \setlength\textwidth{\@tempdima}
  1003.     \fi
  1004. %    \end{macrocode}
  1005. %    In one column mode the text should not be wider than the minimum
  1006. %    of the paperwidth (minus 2 inches for the margins) and the
  1007. %    maximum length of a line as defined by the number of characters.
  1008. %    \begin{macrocode}
  1009.   \else
  1010.     \ifdim\@tempdima>\@tempdimb\relax
  1011.       \setlength\textwidth{\@tempdimb}
  1012.     \else
  1013.       \setlength\textwidth{\@tempdima}
  1014.     \fi
  1015.   \fi
  1016. %    \end{macrocode}
  1017. %    Here we modify the width of the text a little to be a whole
  1018. %    number of points.
  1019. %    \begin{macrocode}
  1020.   \@settopoint\textwidth
  1021. %    \end{macrocode}
  1022. % \end{macro}
  1023. % \begin{macro}{\textheight}
  1024. %    Now that we have computed the width of the text, we have to take
  1025. %    care of the height. The |\textheight| is the height of text
  1026. %    (including footnotes and figures, excluding running head and
  1027. %    foot).
  1028. %    Again we compute this, depending on the papersize and depending
  1029. %    on the baselineskip that is used, in order to have a whole number
  1030. %    of lines on the page.
  1031. %    \begin{macrocode}
  1032.   \setlength\@tempdima{\paperheight}
  1033. %    \end{macrocode}
  1034. %    We leave at least a 1 inch margin on the top and the bottom of
  1035. %    the page.
  1036. %    \begin{macrocode}
  1037.   \addtolength\@tempdima{-2in}
  1038. %    \end{macrocode}
  1039. %    We also have to leave room for the running headers and footers.
  1040. %    \begin{macrocode}
  1041.   \addtolength\@tempdima{-1.5in}
  1042. %    \end{macrocode}
  1043. %    Then we divide the result by the current |\baselineskip| and
  1044. %    store this in the count register |\@tempcnta|, which then
  1045. %    contains the number of lines that fit on this page.
  1046. %    \begin{macrocode}
  1047.   \divide\@tempdima\baselineskip
  1048.   \@tempcnta=\@tempdima
  1049. %    \end{macrocode}
  1050. %    From this we can calculate the height of the text.
  1051. %    \begin{macrocode}
  1052.   \setlength\textheight{\@tempcnta\baselineskip}
  1053. %    \end{macrocode}
  1054. %    The first line on the page has a height of |\topskip|.
  1055. %    \begin{macrocode}
  1056. \addtolength\textheight{\topskip}
  1057. %    \end{macrocode}
  1058. % \end{macro}
  1059. % \subsubsection{Margins}
  1060. % \begin{macro}{\oddsidemargin}
  1061. % \begin{macro}{\evensidemargin}
  1062. % \begin{macro}{\marginparwidth}
  1063. %    The values for |\oddsidemargin| and |\marginparwidth| will be set
  1064. %    depending on the status of the |\if@twoside|.
  1065. %    If |@twoside| is true (which is always the case for book) we make
  1066. %    the inner margin smaller than the outer one.
  1067. %    \begin{macrocode}
  1068.   \setlength{\@tempdima}{\paperwidth}
  1069.   \addtolength{\@tempdima}{-2in}
  1070.   \addtolength{\@tempdima}{-\textwidth}
  1071.   \setlength\oddsidemargin   {.5\@tempdima}
  1072.   \setlength\evensidemargin  {\oddsidemargin}
  1073. %    \end{macrocode}
  1074. %    The width of the margin for text is set to the remainder of the
  1075. %    width except for a `real margin' of white space of width 0.4in.
  1076. %    A check should perhaps be built in to ensure that the (text)
  1077. %    margin width does not get too small!
  1078. %    \begin{macrocode}
  1079.     \setlength\marginparwidth   {.6\@tempdima}
  1080.     \addtolength\marginparwidth {-0.4in}
  1081. %    \end{macrocode}
  1082. % \end{macro}
  1083. % \end{macro}
  1084. % \end{macro}
  1085. % \begin{macro}{\marginparsep}
  1086. % \begin{macro}{\marginparpush}
  1087. %    The horizontal space between the main text and marginal notes is
  1088. %    determined by |\marginparsep|, the minimum vertical separation
  1089. %    between two marginal notes is controlled by |\marginparpush|.
  1090. %    \begin{macrocode}
  1091. %<10pt>  \setlength\marginparsep{11\p@}
  1092. %<11pt>  \setlength\marginparsep{10\p@}
  1093. %<12pt>  \setlength\marginparsep{10\p@}
  1094. %<10pt|11pt>\setlength\marginparpush{5\p@}
  1095. %<12pt>\setlength\marginparpush{7\p@}
  1096. %    \end{macrocode}
  1097. % \end{macro}
  1098. % \end{macro}
  1099. % \begin{macro}{\topmargin}
  1100. %    The |\topmargin| is the distance between the top of `the
  1101. %    printable area' --which is 1 inch below the top of the paper--
  1102. %    and the top of the box which contains the running head.
  1103. %    It can now be computed from the values set above.
  1104. %    \begin{macrocode}
  1105.   \setlength\topmargin{\paperheight}
  1106.   \addtolength\topmargin{-2in}
  1107.   \addtolength\topmargin{-\headheight}
  1108.   \addtolength\topmargin{-\headsep}
  1109.   \addtolength\topmargin{-\textheight}
  1110.   \addtolength\topmargin{-\footskip}     % this might be wrong!
  1111. %    \end{macrocode}
  1112. % \end{macro}
  1113. % \subsubsection{Footnotes}
  1114. % \begin{macro}{\footnotesep}
  1115. %    |\footnotesep| is the height of the strut placed at the beginning
  1116. %    of every footnote. It equals the  height of a normal
  1117. %    |\footnotesize| strut in this
  1118. %    class, thus no extra space occurs between footnotes.
  1119. %    \begin{macrocode}
  1120. %<10pt>\setlength\footnotesep{6.65\p@}
  1121. %<11pt>\setlength\footnotesep{7.7\p@}
  1122. %<12pt>\setlength\footnotesep{8.4\p@}
  1123. %    \end{macrocode}
  1124. % \end{macro}
  1125. % \begin{macro}{\footins}
  1126. %    |\skip\footins| is the space between the last line of the main
  1127. %    text and the top of the first footnote.
  1128. %    \begin{macrocode}
  1129. %<10pt>\setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}
  1130. %<11pt>\setlength{\skip\footins}{10\p@ \@plus 4\p@ \@minus 2\p@}
  1131. %<12pt>\setlength{\skip\footins}{10.8\p@ \@plus 4\p@ \@minus 2\p@}
  1132. %</10pt|11pt|12pt>
  1133. %    \end{macrocode}
  1134. % \end{macro}
  1135. % \subsubsection{Float placement parameters}
  1136. % All float parameters are given default values in the \LaTeXe{}
  1137. % kernel. For this reason counters only need to be set with
  1138. % |\setcounter| and other parameters are set using |\renewcommand|.
  1139. % \paragraph{Limits for the placement of floating objects}
  1140. % \begin{macro}{\c@topnumber}
  1141. %    The \Lcount{topnumber} counter holds the maximum number of
  1142. %    floats that can appear on the top of a text page.
  1143. %    \begin{macrocode}
  1144. %<*lettGF>
  1145. \setcounter{topnumber}{2}
  1146. %    \end{macrocode}
  1147. % \end{macro}
  1148. % \begin{macro}{\topfraction}
  1149. %    This indicates the maximum part of a text page that can be
  1150. %    occupied by floats at the top.
  1151. %    \begin{macrocode}
  1152. \renewcommand{\topfraction}{.7}
  1153. %    \end{macrocode}
  1154. % \end{macro}
  1155. % \begin{macro}{\c@bottomnumber}
  1156. %    The \Lcount{bottomnumber} counter holds the maximum number of
  1157. %    floats that can appear on the bottom of a text page.
  1158. %    \begin{macrocode}
  1159. \setcounter{bottomnumber}{1}
  1160. %    \end{macrocode}
  1161. % \end{macro}
  1162. % \begin{macro}{\bottomfraction}
  1163. %    This indicates the maximum part of a text page that can be
  1164. %    occupied by floats at the bottom.
  1165. %    \begin{macrocode}
  1166. \renewcommand{\bottomfraction}{.3}
  1167. %    \end{macrocode}
  1168. % \end{macro}
  1169. % \begin{macro}{\c@totalnumber}
  1170. %    This indicates the maximum number of floats that can appear on
  1171. %    any text page.
  1172. %    \begin{macrocode}
  1173. \setcounter{totalnumber}{3}
  1174. %    \end{macrocode}
  1175. % \end{macro}
  1176. % \begin{macro}{\textfraction}
  1177. %    This indicates the minimum part of a text page that has to be
  1178. %    occupied by text.
  1179. %    \begin{macrocode}
  1180. \renewcommand{\textfraction}{.2}
  1181. %    \end{macrocode}
  1182. % \end{macro}
  1183. % \begin{macro}{\floatpagefraction}
  1184. %    This indicates the minimum part of a page that has to be
  1185. %    occupied by floating objects before a `float page' is produced.
  1186. %    \begin{macrocode}
  1187. \renewcommand{\floatpagefraction}{.5}
  1188. %    \end{macrocode}
  1189. % \end{macro}
  1190. % \begin{macro}{\c@dbltopnumber}
  1191. %    The \Lcount{dbltopnumber} counter holds the maximum number of
  1192. %    two column floats that can appear on the top of a two column text
  1193. %    page.
  1194. %    \begin{macrocode}
  1195. \setcounter{dbltopnumber}{2}
  1196. %    \end{macrocode}
  1197. % \end{macro}
  1198. % \begin{macro}{\dbltopfraction}
  1199. %    This indicates the maximum part of a two column text page that
  1200. %    can be occupied by two column floats at the top.
  1201. %    \begin{macrocode}
  1202. \renewcommand{\dbltopfraction}{.7}
  1203. %    \end{macrocode}
  1204. % \end{macro}
  1205. % \begin{macro}{\dblfloatpagefraction}
  1206. %    This indicates the minimum part of a page that has to be
  1207. %    occupied by two column wide floating objects before a `float
  1208. %    page' is produced.
  1209. %    \begin{macrocode}
  1210. \renewcommand{\dblfloatpagefraction}{.5}
  1211. %</lettGF>
  1212. %    \end{macrocode}
  1213. % \end{macro}
  1214. % \paragraph{Floats on a text page}
  1215. % \begin{macro}{\floatsep}
  1216. % \begin{macro}{\textfloatsep}
  1217. % \begin{macro}{\intextsep}
  1218. %    When a floating object is placed on a page with text, these
  1219. %    parameters control the separation between the float and the other
  1220. %    objects on the page. These parameters are used for both
  1221. %    one-column mode and single-column floats in two-column mode.
  1222. %    |\floatsep| is the space between adjacent floats that are moved
  1223. %    to the top or bottom of the text page.
  1224. %    |\textfloatsep| is the space between the main text and floats
  1225. %    at the top or bottom of the page.
  1226. %    |\intextsep| is the space between in-text floats and the text.
  1227. %    \begin{macrocode}
  1228. %<*10pt>
  1229. \setlength\floatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
  1230. \setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
  1231. \setlength\intextsep   {12\p@ \@plus 2\p@ \@minus 2\p@}
  1232. %</10pt>
  1233. %<*11pt>
  1234. \setlength\floatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
  1235. \setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
  1236. \setlength\intextsep   {12\p@ \@plus 2\p@ \@minus 2\p@}
  1237. %</11pt>
  1238. %<*12pt>
  1239. \setlength\floatsep    {12\p@ \@plus 2\p@ \@minus 4\p@}
  1240. \setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
  1241. \setlength\intextsep   {14\p@ \@plus 4\p@ \@minus 4\p@}
  1242. %</12pt>
  1243. %    \end{macrocode}
  1244. % \end{macro}
  1245. % \end{macro}
  1246. % \end{macro}
  1247. % \begin{macro}{\dblfloatsep}
  1248. % \begin{macro}{\dbltextfloatsep}
  1249. %    When floating objects that span the whole |\textwidth| are placed
  1250. %    on a text page when we are in twocolumn mode the separation
  1251. %    between the float and the text is controlled by |\dblfloatsep|
  1252. %    and |\dbltextfloatsep|.
  1253. %    |\dblfloatsep| is the space between adjacent floats that are moved
  1254. %    to the top or bottom of the text page.
  1255. %    |\dbltextfloatsep| is the space between the main text and floats
  1256. %    at the top or bottom of the page.
  1257. %    \begin{macrocode}
  1258. %<*10pt>
  1259. \setlength\dblfloatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
  1260. \setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
  1261. %</10pt>
  1262. %<*11pt>
  1263. \setlength\dblfloatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}
  1264. \setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
  1265. %</11pt>
  1266. %<*12pt>
  1267. \setlength\dblfloatsep    {14\p@ \@plus 2\p@ \@minus 4\p@}
  1268. \setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
  1269. %</12pt>
  1270. %    \end{macrocode}
  1271. % \end{macro}
  1272. % \end{macro}
  1273. % \paragraph{Floats on their own page or column}
  1274. % \begin{macro}{\@fptop}
  1275. % \begin{macro}{\@fpsep}
  1276. % \begin{macro}{\@fpbot}
  1277. %    When floating objects are placed on separate pages the layout of
  1278. %    such pages is controlled by these parameters. At the top of the
  1279. %    page |\@fptop| amount of stretchable whitespace is inserted, at
  1280. %    the bottom of the page we get an |\@fpbot| amount of stretchable
  1281. %    whitespace. Between adjacent floats the |\@fpsep| is inserted.
  1282. %    These parameters are used for the placement of floating objects
  1283. %    in one column mode, or in single column floats in two column
  1284. %    mode.
  1285. %    Note that at least one of the two parameters |\@fptop| and
  1286. %    |\@fpbot| should contain a |plus ...fil| to allow filling the
  1287. %    remaining empty space.
  1288. %    \begin{macrocode}
  1289. %<*10pt>
  1290. \setlength\@fptop{0\p@ \@plus 1fil}
  1291. \setlength\@fpsep{8\p@ \@plus 2fil}
  1292. \setlength\@fpbot{0\p@ \@plus 1fil}
  1293. %</10pt>
  1294. %<*11pt>
  1295. \setlength\@fptop{0\p@ \@plus 1fil}
  1296. \setlength\@fpsep{8\p@ \@plus 2fil}
  1297. \setlength\@fpbot{0\p@ \@plus 1fil}
  1298. %</11pt>
  1299. %<*12pt>
  1300. \setlength\@fptop{0\p@ \@plus 1fil}
  1301. \setlength\@fpsep{10\p@ \@plus 2fil}
  1302. \setlength\@fpbot{0\p@ \@plus 1fil}
  1303. %</12pt>
  1304. %    \end{macrocode}
  1305. % \end{macro}
  1306. % \end{macro}
  1307. % \end{macro}
  1308. % \begin{macro}{\@dblfptop}
  1309. % \begin{macro}{\@dblfpsep}
  1310. % \begin{macro}{\@dblfpbot}
  1311. %    Double column floats in two column mode are handled with similar
  1312. %    parameters.
  1313. %    \begin{macrocode}
  1314. %<*10pt>
  1315. \setlength\@dblfptop{0\p@ \@plus 1fil}
  1316. \setlength\@dblfpsep{8\p@ \@plus 2fil}
  1317. \setlength\@dblfpbot{0\p@ \@plus 1fil}
  1318. %</10pt>
  1319. %<*11pt>
  1320. \setlength\@dblfptop{0\p@ \@plus 1fil}
  1321. \setlength\@dblfpsep{8\p@ \@plus 2fil}
  1322. \setlength\@dblfpbot{0\p@ \@plus 1fil}
  1323. %</11pt>
  1324. %<*12pt>
  1325. \setlength\@dblfptop{0\p@ \@plus 1fil}
  1326. \setlength\@dblfpsep{10\p@ \@plus 2fil}
  1327. \setlength\@dblfpbot{0\p@ \@plus 1fil}
  1328. %</12pt>
  1329. %<*lettGF>
  1330. %    \end{macrocode}
  1331. % \end{macro}
  1332. % \end{macro}
  1333. % \end{macro}
  1334. % \subsection{Page Styles}
  1335. %    The page style \pstyle{foo} is defined by defining the command
  1336. %    |\ps@foo|.   This command should make only local definitions.
  1337. %    There should be no stray spaces in the definition, since they
  1338. %    could lead to mysterious extra spaces in the output (well, that's
  1339. %    something that should be always avoided).
  1340. % \begin{macro}{\@evenhead}
  1341. % \begin{macro}{\@oddhead}
  1342. % \begin{macro}{\@evenfoot}
  1343. % \begin{macro}{\@oddfoot}
  1344. %    The |\ps@...| command defines the macros |\@oddhead|,
  1345. %    |\@oddfoot|, |\@evenhead|, and |\@evenfoot| to define the running
  1346. %    heads and feet---e.g., |\@oddhead| is the macro to produce the
  1347. %    contents of the heading box for odd-numbered pages.  It is called
  1348. %    inside an |\hbox| of width |\textwidth|.
  1349. % \end{macro}
  1350. % \end{macro}
  1351. % \end{macro}
  1352. % \end{macro}
  1353. % \subsubsection{Marking conventions}
  1354. %    To make headings determined by the sectioning commands, the page
  1355. %    style defines the commands |\chaptermark|, |\sectionmark|,
  1356. %    \ldots, where |\chaptermark{|\meta{text}|}| is called by
  1357. %    |\chapter| to set a mark, and so on.
  1358. %    The |\...mark| commands and the |\...head| macros are defined
  1359. %    with the help of the following macros.  (All the |\...mark|
  1360. %    commands should be initialized to no-ops.)
  1361. %    \LaTeX{} extends \TeX's |\mark| facility by producing two kinds
  1362. %    of marks, a `left' and a `right' mark, using the following
  1363. %    commands:
  1364. %    \begin{flushleft}
  1365. %     |\markboth{|\meta{left}|}{|\meta{right}|}|: Adds both marks.
  1366. %     |\markright{|\meta{right}|}|: Adds a `right' mark.
  1367. %     |\leftmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead|
  1368. %                  or |\@evenfoot| macros, it gets the current `left'
  1369. %                  mark.  |\leftmark| works like \TeX's |\botmark|
  1370. %                  command.
  1371. %     |\rightmark|: Used in the |\@oddhead|, |\@oddfoot|, |\@evenhead|
  1372. %                   or  |\@evenfoot| macros, it gets the current
  1373. %                   `right' mark. |\rightmark| works like \TeX's
  1374. %                   |\firstmark| command.
  1375. %    \end{flushleft}
  1376. %    The marking commands work reasonably well for right marks
  1377. %    `numbered within' left marks--e.g., the left mark is changed by a
  1378. %    |\chapter| command and the right mark is changed by a |\section|
  1379. %    command.  However, it does produce somewhat anomalous results if
  1380. %    two |\markboth|'s occur on the same page.
  1381. %    Commands like |\tableofcontents| that should set the marks in some
  1382. %    page styles use a |\@mkboth| command, which is |\let| by the
  1383. %    pagestyle command (|\ps@...|)  to |\markboth| for setting the
  1384. %    heading or to |\@gobbletwo| to do nothing.
  1385. %    \begin{macrocode}
  1386. % %%%\mark{{}{}}   % Initializes TeX's marks   <--- can vanish
  1387. %    \end{macrocode}
  1388. % \subsubsection{Defining the page styles}
  1389. % \label{sec:pagestyle}
  1390. %    The pagestyles \pstyle{empty} and \pstyle{plain} are defined in
  1391. %    \file{latex.tex}.
  1392. % \begin{macro}{\ps@headings}
  1393. %    The definition of the page style \pstyle{headings} has to be
  1394. %    different for two sided printing than it is for one sided
  1395. %    printing.
  1396. %    \begin{macrocode}
  1397. \ifthenelse{\boolean{@twoside}}
  1398.  {\def\ps@headings{%
  1399. %    \end{macrocode}
  1400. %    The running feet are empty in this page style.
  1401. %    \begin{macrocode}
  1402.       \let\@oddfoot\@empty
  1403.       \let\@evenfoot\@empty
  1404. %    \end{macrocode}
  1405. %    The running head contains some information about this letter. The
  1406. %    head is the same for even and odd pages.
  1407. %    \begin{macrocode}
  1408.       \ifthenelse{\setboolean{noheader}}
  1409.         {\let\@oddhead\@empty}
  1410.         {\setlength\headheight{36\p@}
  1411.          \def\@oddhead{\@setheader}}
  1412.       \let\@evenhead\@oddhead}}
  1413. %    \end{macrocode}
  1414. %    For one sided printing we don't need to define |\@evenhead| so
  1415. %    the definition is somewhat simpler.
  1416. %    \begin{macrocode}
  1417.  {\def\ps@headings{%
  1418.       \let\@oddfoot\@empty
  1419.       \ifthenelse{\setboolean{noheader}}
  1420.         {\let\@oddhead\@empty}
  1421.         {\setlength\headheight{36\p@}
  1422.          \def\@oddhead{\@setheader}}}}
  1423. %    \end{macrocode}
  1424. % \end{macro}
  1425. % \begin{macro}{\ps@empty}
  1426. %    The definition of the page style \pstyle{empty} is simple:
  1427. %    No running head or foot at all.
  1428. %    \begin{macrocode}
  1429. \def\ps@empty{%
  1430.   \let\@oddfoot\@empty
  1431.   \let\@oddhead\@empty
  1432.   \let\@evenfoot\@empty
  1433.   \let\@evenhead\@empty}
  1434. %    \end{macrocode}
  1435. % \end{macro}
  1436. % \begin{macro}{\ps@firstpage}
  1437. %    The page style \pstyle{firstpage} puts the telephone number
  1438. %    in the proper place for the letterhead. It should be adapted
  1439. %    to site conventions. The size of the number is determined
  1440. %    depending on the main size.
  1441. %    \begin{macrocode}
  1442. \def\ps@firstpage{%
  1443.   \ifnoheader
  1444.     \let\@oddhead\@empty
  1445.    \else
  1446.     \setlength\headheight{36\p@}
  1447.     \def\@evenhead{\@setheader}
  1448.   \fi
  1449.   \def\@oddfoot{\raisebox{0\p@}[\z@]{\@setfooter}
  1450.   \hss}}
  1451. %    \end{macrocode}
  1452. % \end{macro}
  1453. % \begin{macro}{\ps@plain}
  1454. %    The definition of the page style \pstyle{plain} is again simple.
  1455. %    \begin{macrocode}
  1456. \def\ps@plain{%
  1457.   \ifnoheader
  1458.     \let\@oddhead\@empty
  1459.    \else
  1460.     \setlength\headheight{36\p@}
  1461.     \def\@oddhead{\@setheader}
  1462.   \fi
  1463.   \def\@oddfoot{
  1464.     \rmfamily
  1465.     \hfil
  1466.     \thepage
  1467.     \ifthenelse{\boolean{faxpaper}}
  1468.      {/\pagenum}
  1469.      {}
  1470.     \hfil}%
  1471.   \let\@evenfoot\@oddfoot}%
  1472. %    \end{macrocode}
  1473. % \end{macro}
  1474. %  \subsection{documentbegin/end with faxoption}
  1475. %    At the end of the document write out the total number of
  1476. %    page in the auxfile.
  1477. %    \begin{macrocode}
  1478. \ifthenelse{\boolean{faxpaper}}
  1479.   {\@fileswtrue
  1480.    \AtEndDocument{
  1481.      \addtocounter{page}{-1}
  1482.      \immediate\write\@mainaux{\string\def\string\pagenum{\thepage}}
  1483.      \addtocounter{page}{1}
  1484.      }}
  1485.   {\@fileswfalse}
  1486. %    \end{macrocode}
  1487. % \section{Document Markup}
  1488. % \subsection{Global Declarations}
  1489. %  \begin{macro}{\leftfield}
  1490. %    Width of the left part of the headline.
  1491. %    \begin{macrocode}
  1492. \setlength\unitlength{\p@}
  1493. \newlength{\leftfield}
  1494. \setlength\leftfield{0.6\textwidth}
  1495. %    \end{macrocode}
  1496. %  \end{macro}
  1497. %  \begin{macro}{\rightfield}
  1498. %    Width of the right part of the headline.
  1499. %    \begin{macrocode}
  1500. \newlength{\rightfield}
  1501. \setlength\rightfield{\textwidth}
  1502. \addtolength{\rightfield}{-\leftfield}
  1503. %    \end{macrocode}
  1504. %  \end{macro}
  1505. %  \begin{macro}{\@date}
  1506. %    This macro uses the \TeX\ primitives |\month|, |\day| and |\year|
  1507. %    to provide the date of the \LaTeX-run.
  1508. %    \begin{macrocode}
  1509. \providecommand{\@date}
  1510.           {\newboolean{@datelongboo}
  1511.            \setboolean{@datelongboo}{false}
  1512.            \ifthenelse{\equal{\@yref}{}}
  1513.             {\ifthenelse{\equal{\@myref}{}}
  1514.               {\setboolean{@datelongboo}{true}}{}
  1515.             }{}
  1516.            \ifthenelse{\equal{\@ymail}{}}
  1517.             {\ifthenelse{\boolean{fax}}
  1518.               {\ifthenelse{\equal{\@myref}{}}
  1519.                 {\setboolean{@datelongboo}{true}}{}
  1520.                \ifthenelse{\equal{\@yref}{}}
  1521.                 {\setboolean{@datelongboo}{true}}{}
  1522.               }
  1523.               {\setboolean{@datelongboo}{true}}{}
  1524.             }
  1525.             {\ifthenelse{\boolean{fax}}
  1526.               {}
  1527.               {\ifthenelse{\equal{\@myref}{}}
  1528.                 {\setboolean{@datelongboo}{true}}{}
  1529.                \ifthenelse{\equal{\@yref}{}}
  1530.                 {\setboolean{@datelongboo}{true}}{}
  1531.               }
  1532.             }
  1533.            \ifthenelse{\boolean{@datelongboo}}
  1534.             {\@datelong}
  1535.             {\@dateshort}
  1536.           }
  1537. %    \end{macrocode}
  1538. %  \end{macro}
  1539. %  \begin{macro}{\@date}
  1540. %    Macro to to caculate the actual time, but not to print it.
  1541. %    \begin{macrocode}
  1542. \newcommand{\@calculate@time}{
  1543. %    \end{macrocode}
  1544. %    expands to the actual time (hours:minutes)
  1545. %    written by Dimitris Dranidis
  1546. %    (modified by Michael Mehlich to avoid temporary counter)
  1547. %    \begin{macrocode}
  1548.   \newcount\hours
  1549.   \newcount\minutes
  1550. %    \end{macrocode}
  1551. %    calculate hours and minutes\\
  1552. %    hours = time/60 = ((time/60)*60)/60\\
  1553. %    minutes = time-(time/60)*60\\
  1554. %    \begin{macrocode}
  1555.   \minutes\time
  1556.   \hours\minutes\divide\hours60\multiply\hours60
  1557.   \advance\minutes-\hours
  1558.   \divide\hours60
  1559. %    \end{macrocode}
  1560. %  \end{macro}
  1561. %  \begin{macro}{\@date}
  1562. %    macro to output calculated time
  1563. %    \begin{macrocode}
  1564. \def\@time{\@calculate@time
  1565.            \the\hours:%
  1566.            \ifnum\minutes<10
  1567.              0%
  1568.             \else
  1569.            \fi
  1570.            \the\minutes}
  1571. %    \end{macrocode}
  1572. %  \end{macro}
  1573. % \begin{macro}{\pagenum}
  1574. % \begin{macro}{\@yref}
  1575. % \begin{macro}{\@mref}
  1576. % \begin{macro}{\@ymaildate}
  1577. % \begin{macro}{\@subject}
  1578. %    We make sure that the internal control sequences that are used to
  1579. %    store the information exist and are empty.
  1580. %    \begin{macrocode}
  1581. \def\pagenum{??}
  1582. \def\@yref{}
  1583. \def\@mref{}
  1584. \def\@ymaildate{}
  1585. \def\@subject{}
  1586. %    \end{macrocode}
  1587. % \end{macro}
  1588. % \end{macro}
  1589. % \end{macro}
  1590. % \end{macro}
  1591. % \end{macro}
  1592. %                       
  1593. % \begin{macro}{\@setheader}
  1594. %    Command to print the header, that exist out of two parts.
  1595. %    \begin{macrocode}
  1596. \newcommand{\@setheader}
  1597.   {\parbox[t]{\textwidth}%
  1598. %    \end{macrocode}
  1599. %    Set the left part.
  1600. %    \begin{macrocode}
  1601.      {\parbox[b]{\leftfield}
  1602.         {\ifcase\@ptsize\relax
  1603.            \LARGE
  1604.           \or
  1605.            \Large
  1606.           \or
  1607.            \large
  1608.          \fi
  1609.          \sffamily\fromname}%
  1610. %    \end{macrocode}
  1611. %    Set the right part with the picture or anythingelse.
  1612. %    \begin{macrocode}
  1613.       \parbox[b]{\rightfield}
  1614.         {\hfill
  1615.          \ifx\bilddateiname\empty
  1616.           \else
  1617.            \input{\bilddateiname}%
  1618.            \csname set\bilddateiname\endcsname%
  1619.          \fi}\\[1mm]%
  1620.       \rule{\textwidth}{0.1mm}
  1621.      }%
  1622. %    \end{macrocode}
  1623. % \end{macro}
  1624. % \begin{macro}{\@setfooter}
  1625. %    Command to print the footer, which contents the bankconnection 
  1626. %    or/and the full adress.
  1627. %    \begin{macrocode}
  1628. \newcommand{\@setfooter}
  1629.   {\parbox[b]{\textwidth}
  1630.      {\ifcase\@ptsize\relax
  1631.         \small
  1632.        \or
  1633.         \footnotesize
  1634.        \or
  1635.         \scriptsize
  1636.       \fi
  1637.       \tabcolsep0.5ex
  1638. %    \end{macrocode}
  1639. %    Print the full address.
  1640. %    \begin{macrocode}
  1641.       \ifthenelse{\boolean{fulladdress}}
  1642.        {\sffamily\rule{\textwidth}{1pt}
  1643.         \begin{tabular}{l}
  1644.           \fromname\\
  1645.           \fromstreet\\
  1646.           \fromlocation
  1647.         \end{tabular}
  1648.         \hfill
  1649.         \begin{tabular}{ll}
  1650.           \telephonestr:&\precode/\telephonenum\\
  1651.           \faxnrstr:    &\precode/\myfax\\
  1652.           \emailadrstr: &\myemail
  1653.         \end{tabular}
  1654. %    \end{macrocode}
  1655. %    Print the bankconnection.
  1656. %    \begin{macrocode}
  1657.         \ifthenelse{\boolean{bankconnection}}
  1658.          {\hfill
  1659.           \begin{tabular}{ll}
  1660.             \banknamestr:  &\bankname\\
  1661.             \banknrstr:    &\banknr\\
  1662.             \accountnrstr: &\accountnr
  1663.           \end{tabular}
  1664.          }{}
  1665.        }
  1666.        {\ifthenelse{\boolean{bankconnection}}
  1667.          {\sffamily\rule{\textwidth}{1pt}
  1668.           \underline{\bankconnectionstr:} \bankname \hfill
  1669.           \banknrstr: \banknr \hfill \accountnrstr: \accountnr
  1670.          }{}
  1671.        }
  1672.     }
  1673. %    \end{macrocode}
  1674. % \end{macro}
  1675. % \subsection{The generic letter commands}
  1676. % \begin{environment}{letter}
  1677. %     The letter environment creates a new letter, starting from page 1.
  1678. %     (The first page is unnumbered.)  It has a single argument, which
  1679. %     is the addressee and his address, as in
  1680. %\begin{verbatim}
  1681. %  \begin{letter}{Sam Jones \\
  1682. %                 Institute for Retarded Study\\
  1683. %                 Princeton, N.J.}
  1684. %\end{verbatim}
  1685. %     Local declarations, such as |\address|, can follow the
  1686. %     |\begin{letter}|.
  1687. %    \begin{macrocode}
  1688. \newenvironment{letter}[2][empty]
  1689.   {\pagestyle{plain}
  1690.    \newpage
  1691.    \ifthenelse{\boolean{@twoside}}
  1692.     {\ifthenelse{\isodd{\c@page}}
  1693.       {}
  1694.       {\thispagestyle{plain} \hbox{}\newpage}
  1695.     }{}
  1696.    \c@page\@ne
  1697.    \interlinepenalty=200 % smaller than the TeXbook value
  1698.    \ifthenelse{\boolean{mletterboo}}
  1699.     {\ifthenelse{\equal{#1}{empty}}
  1700.       {}
  1701.       {\ClassError{\ClassName}{\errormesc}{\errorhelpc}}
  1702.      \ifthenelse{\equal{#2}{\empty}}
  1703.       {}
  1704.       {\ClassError{\ClassName}{\errormesc}{\errorhelpc}}}
  1705.     {\searchaddress[#1]{#2}}
  1706. %    \end{macrocode}
  1707. %    The |\leavevmode| and |\ignorespaces| commands are there for
  1708. %    protecting against an empty argument.
  1709. %    \begin{macrocode}
  1710.    \@processto{\leavevmode\ignorespaces \csname\adr\endcsname}}
  1711. %    \end{macrocode}
  1712. %    The end of the environment possibly writes the address
  1713. %    information on the \file{.aux} file.
  1714. %    \begin{macrocode}
  1715.   {\stopletter\@@par
  1716.    \ifthenelse{\value{psnum}=1}{\psname\space\@ps\\}{}
  1717.    \pagebreak\@@par}
  1718. %    \end{macrocode}
  1719. % \end{environment}
  1720. % \begin{macro}{\@processto}
  1721. % \begin{macro}{\@xproc}
  1722. % \begin{macro}{\@yproc}
  1723. %    |\@processto| gets the |\toname| and |\toaddress| from the letter
  1724. %    environment's macro argument. |\@xproc| and |\@yproc| are auxiliary
  1725. %    macros.
  1726. %    \begin{macrocode}
  1727. \long\def\@processto#1{\@xproc #1\\@@@\ifx\toaddress\@empty
  1728.     \else \@yproc #1@@@\fi}
  1729. \long\def\@xproc #1\\#2@@@{\def\toname{#1}\def\toaddress{#2}}
  1730. \long\def\@yproc #1\\#2@@@{\def\toaddress{#2}}
  1731. %    \end{macrocode}
  1732. % \end{macro}
  1733. % \end{macro}
  1734. % \end{macro}
  1735. % \subsubsection{Page breaking control}
  1736. % \begin{macro}{\stopbreaks}
  1737. %    When the command |\stopbreaks| is issued no page breaks should
  1738. %    occur until |\startbreaks| is called.
  1739. %    \begin{macrocode}
  1740. \newcommand*{\stopbreaks}{\interlinepenalty \@M
  1741.    \def\par{\@@par\nobreak}\let\\=\@nobreakcr
  1742.    \let\vspace\@nobreakvspace}
  1743. %    \end{macrocode}
  1744. % \end{macro}
  1745. % \begin{macro}{\nobreakvspace}
  1746. % \begin{macro}{\nobreakvspacex}
  1747. % \begin{macro}{\nobreakcr}
  1748. %    These are needed by |\stopbreaks|
  1749. %    \begin{macrocode}
  1750. \def\@nobreakvspace{\@ifstar{\@nobreakvspacex}{\@nobreakvspacex}}
  1751. \def\@nobreakvspacex#1{\ifvmode\nobreak\vskip #1\relax\else
  1752.                \@bsphack\vadjust{\nobreak\vskip #1}\@esphack\fi}
  1753. \def\@nobreakcr{\vadjust{\penalty\@M}\@ifstar{\@xnewline}{\@xnewline}}
  1754. %    \end{macrocode}
  1755. % \end{macro}
  1756. % \end{macro}
  1757. % \end{macro}
  1758. % \begin{macro}{\startbreaks}
  1759. %    This cancels the effect of |\stopbreaks|.
  1760. %    \begin{macrocode}
  1761. \newcommand*{\startbreaks}{\let\\=\@normalcr
  1762.    \interlinepenalty 200\def\par{\@@par\penalty 200\relax}}
  1763. %    \end{macrocode}
  1764. % \end{macro}
  1765. % \begin{macro}{\to@label}
  1766. %    Because the german post can deliver the letters faster, if the 
  1767. %    addresslabel written in sanserif 10pt-12pt, because of maschinell 
  1768. %    reading.
  1769. %    \begin{macrocode}
  1770. \newcommand{\to@label}[2]
  1771.   {\setbox0\vbox
  1772.     {\parbox{\leftfield}
  1773.        {\ifcase\@ptsize\relax
  1774.           \LARGE
  1775.          \or
  1776.           \Large
  1777.          \or
  1778.           \large
  1779.         \fi
  1780.         \sf#1\\#2}}
  1781.    \vbox to 3.5cm{\vss\box0\vss}}
  1782. %    \end{macrocode}
  1783. % \end{macro}
  1784. % \begin{macro}{\longindentation}
  1785. %    The size of the indent to use before the closing of the letter.
  1786. %    \begin{macrocode}
  1787. \newdimen\longindentation
  1788. \longindentation=.5\textwidth
  1789. %    \end{macrocode}
  1790. % \end{macro}
  1791. % \begin{macro}{\indentedwidth}
  1792. %    The width of the closing of the letter.
  1793. %    \begin{macrocode}
  1794. \newdimen\indentedwidth
  1795. \indentedwidth=\textwidth
  1796. \advance\indentedwidth -\longindentation
  1797. %    \end{macrocode}
  1798. % \end{macro}
  1799. % \begin{macro}{\opening}
  1800. %     Text is begun with the |\opening| command, whose argument
  1801. %     generates the salutation, as in
  1802. %\begin{verbatim}
  1803. %      \opening{Dear Henry,}
  1804. %\end{verbatim}
  1805. %    This should produce everything up to and including the `Dear Henry,'
  1806. %    and a \par command that follows. Since there's a |\vfil| at the
  1807. %    bottom of every page, it can add vertical fill to position a short
  1808. %    letter. It should use the following commands:
  1809. %   \begin{itemize}
  1810. %   \item |\toname| : name part of `to' address.
  1811. %                     Will be one line long. 
  1812. %   \item |\toaddress| : address part of `to' address.
  1813. %                        The lines separated by |\\|.
  1814. %   \item |\fromname| : name of sender.
  1815. %   \item |\fromaddress| : argument of current |\address|
  1816. %     declaration-- null if none.  Should use standard institutional
  1817. %     address if null. 
  1818. %   \item |\fromlocation| : argument of current |\location|
  1819. %     declaration--null if none.
  1820. %   \item |\telephonenum| : argument of current |\telephone|
  1821. %     declaration--null if none.
  1822. %    \end{itemize}
  1823. %    \begin{macrocode}
  1824. \newcommand{\opening}[2][empty]{
  1825.    \thispagestyle{firstpage}
  1826.    \parbox[t]{\leftfield}
  1827.      {\ifcase \@ptsize\relax
  1828.         \normalsize
  1829.        \or
  1830.         \small
  1831.        \or
  1832.         \footnotesize
  1833.       \fi
  1834.       \underline{\sf \fromaddress}\\
  1835.       \to@label{\toname}{\toaddress}
  1836.      }
  1837.    \parbox[t]{\rightfield}{}
  1838.    \par
  1839.    \rule{\textwidth}{0.1mm}
  1840.    \tabcolsep0em
  1841.    \begin{tabular}{l}
  1842.       \ifcase \@ptsize\relax
  1843.         \small
  1844.        \or
  1845.         \footnotesize
  1846.        \or
  1847.         \scriptsize
  1848.        \fi
  1849.        \datestr\\
  1850.        \normalsize
  1851.        \@date
  1852.    \end{tabular}
  1853.    \ifthenelse{\boolean{faxpaper}}
  1854.     {\hfill
  1855.      \begin{tabular}{c}
  1856.       \ifcase \@ptsize\relax
  1857.         \small
  1858.        \or
  1859.         \footnotesize
  1860.        \or
  1861.         \scriptsize
  1862.       \fi
  1863.       \timestr\\
  1864.       \normalsize
  1865.       \@time
  1866.      \end{tabular}
  1867.      \hfill
  1868.      \begin{tabular}{c}
  1869.       \ifcase \@ptsize\relax
  1870.         \small
  1871.        \or
  1872.         \footnotesize
  1873.        \or
  1874.         \scriptsize
  1875.        \fi
  1876.        \pagenumstr\\
  1877.        \normalsize
  1878.        \pagenum
  1879.      \end{tabular}
  1880.     }
  1881.    \hfill
  1882.    \ifthenelse{\equal{\@myref}{\empty}}
  1883.     {}
  1884.     {\begin{tabular}{c}
  1885.        \ifcase\@ptsize\relax
  1886.          \small
  1887.         \or
  1888.          \footnotesize
  1889.         \or
  1890.          \scriptsize
  1891.        \fi
  1892.        \myrefname\\
  1893.        \normalsize
  1894.        \@myref
  1895.      \end{tabular}\hfill
  1896.     }
  1897.    \ifthenelse{\equal{\@yref}{\empty}}
  1898.     {}
  1899.     {\begin{tabular}{c}
  1900.        \ifcase\@ptsize\relax
  1901.          \small
  1902.         \or
  1903.          \footnotesize
  1904.         \or
  1905.          \scriptsize
  1906.        \fi
  1907.        \yrefstr\\
  1908.        \normalsize\@yref%
  1909.      \end{tabular}
  1910.      \hfill
  1911.     }
  1912.    \ifthenelse{\equal{\@ymaildate}{\empty}}
  1913.     {}
  1914.     {\begin{tabular}{r}
  1915.        \ifcase\@ptsize\relax
  1916.          \small
  1917.         \or
  1918.          \footnotesize
  1919.         \or
  1920.          \scriptsize
  1921.        \fi
  1922.        \ymaildatestr\\
  1923.        \normalsize\@ymaildate%
  1924.      \end{tabular}
  1925.      \hfill
  1926.     }
  1927.    \par
  1928.    \tabcolsep1em
  1929.    \vspace{3\parskip}
  1930.    \ifthenelse{\equal{\@subject}{\empty}}
  1931.     {}
  1932.     {\ifthenelse{\equal{\subjectstr}{\empty}}
  1933.       {{\bf \@subject}}
  1934.       {{\bf\subjectstr}\space\@subject}
  1935.      \par
  1936.      \vspace{2\parskip}
  1937.     }
  1938.    \ifthenelse{\equal{#1}{empty}}
  1939.     {\ifthenelse{\equal{#2}{\empty}}
  1940.       {\openingtext}
  1941.       {#2}}
  1942.     {\csname #1\endcsname
  1943.      \ifthenelse{\equal{#2}{\empty}}
  1944.       {}
  1945.       {\space #2},}
  1946.    \par\nobreak
  1947. %    \end{macrocode}
  1948. % \end{macro}
  1949. % \begin{macro}{\closing}
  1950. %     The body of the letter follows, ended by a |\closing| command,
  1951. %     as in
  1952. %\begin{verbatim}
  1953. %            \closing{Yours truly,}
  1954. %\end{verbatim}
  1955. %     This command generates the closing matter, and the signature.
  1956. %     An obvious thing to do is to use a |\parbox| for the closing
  1957. %     and the signature.  Should use the following:
  1958. %    \begin{itemize}
  1959. %      \item |\fromsig| : argument of current |\signature| declaration
  1960. %                   or, if null, the |\fromname|.
  1961. %      \item |\stopbreaks| : a macro that inhibits page breaking.
  1962. %    \end{itemize}
  1963. %    \begin{macrocode}
  1964. \newcommand{\closing}[1]{
  1965.   \par\nobreak\vspace{\parskip}%
  1966.   \stopbreaks%
  1967.   \noindent%
  1968.   \hspace*{\longindentation}%
  1969.   \parbox{\indentedwidth}
  1970.       {\raggedright
  1971.        \ifthenelse{\equal{#1}{\empty}}
  1972.         {\closingtext}
  1973.         {\@ifundefined{#1}%
  1974.           {#1}
  1975.           {\csname #1\endcsname}
  1976.         }\\
  1977.        \ifthenelse{\equal{\csname\contactstr\endcsname}{\contactgood}}%
  1978.         {Dein%
  1979.          \ifthenelse{\boolean{faxpaper}}%
  1980.           {\ifthenelse{\equal{\unterschriftdateiname}{\empty}}%
  1981.             {\vspace{6\medskipamount}}%
  1982.             {\par%
  1983.              \vspace{3\medskipamount}%
  1984.              \hspace{1em}%
  1985.              \input{\unterschriftdateiname}%
  1986.              \csname set\unterschriftdateiname\endcsname%
  1987.              \par}}
  1988.           {\vspace{6\medskipamount}}
  1989.         }
  1990.         {\ifthenelse{\boolean{faxpaper}}%
  1991.           {\ifthenelse{\equal{\unterschriftdateiname}{\empty}}%
  1992.             {\vspace{6\medskipamount}}%
  1993.             {\par%
  1994.              \vspace{3 \medskipamount}%
  1995.              \hspace{1em}%
  1996.              \input{\unterschriftdateiname}%
  1997.              \csname set\unterschriftdateiname\endcsname%
  1998.              \par}}
  1999.           {\vspace{6\medskipamount}}%
  2000.          \vspace{1\medskipamount}%
  2001.          \ifthenelse{\equal{\fromsig}{\empty}}%
  2002.           {}
  2003.           {(\fromsig)}
  2004.         }%
  2005.        \strut
  2006.       }%
  2007.   \vfill}
  2008. %    \end{macrocode}
  2009. % \end{macro}
  2010. % \begin{macro}{\smallskipamount}
  2011. % \begin{macro}{\mdeskipamount}
  2012. % \begin{macro}{\bigskipamount}
  2013. %   Of these three, only |\medskipmount| is actually used above.
  2014. %    \begin{macrocode}
  2015. %\smallskipamount=.5\parskip
  2016. \medskipamount=\parskip
  2017. %\bigskipamount=2\parskip
  2018. %    \end{macrocode}
  2019. % \end{macro}
  2020. % \end{macro}
  2021. % \end{macro}
  2022. % \begin{macro}{\cc}
  2023. % \begin{macro}{\encl}
  2024. % \begin{macro}{\ps}
  2025. %    After the |\closing| you can put arbitrary stuff, which is typeset
  2026. %    with zero |\parindent| and no page breaking.  Commands designed
  2027. %    for use after the closing are:
  2028. %    \begin{verbatim}
  2029. %  \cc{Tinker\\Evers\\Chance}
  2030. %\end{verbatim}
  2031. %    which produces:\\
  2032. %    \begin{tabular}{ll}
  2033. %        cc: & Tinker\\
  2034. %            & Evers\\
  2035. %            & Chance
  2036. %    \end{tabular}\\
  2037. %    Note the obvious use of |\parbox|.
  2038. %    \begin{macrocode}
  2039. \newlength{\word}
  2040. \newcommand*{\cc}[1]{%
  2041.   \par\noindent
  2042.   \parbox[t]{\textwidth}{%
  2043.     \@hangfrom{\reset@font\rm \ccname: }%
  2044.     \ignorespaces #1\strut}\par}
  2045. %    \end{macrocode}
  2046. %\begin{verbatim}
  2047. %  \encl{Foo(2)\\Bar}
  2048. %\end{verbatim}
  2049. %    which produces:\\
  2050. %    \begin{tabular}{ll}
  2051. %        encl: & Foo(2)\\
  2052. %              & Bar
  2053. %    \end{tabular}
  2054. %    \begin{macrocode}
  2055. \newcommand*{\encl}[1]{%
  2056.   \par\noindent
  2057.   \parbox[t]{\textwidth}{%
  2058.     \@hangfrom{\reset@font\rm \enclname: }%
  2059.     \ignorespaces #1\strut}\par}
  2060. %    \end{macrocode}
  2061. %\begin{verbatim}
  2062. %  \ps{Bar}
  2063. %\end{verbatim}
  2064. %    which produces:\\
  2065. %  PS.: Bar
  2066. %\begin{verbatim}
  2067. %  \ps{Foo(2)
  2068. %  \ps{Bar}
  2069. %\end{verbatim}
  2070. %    \begin{tabular}{ll}
  2071. %        encl: & 1) Foo(2)\\
  2072. %              & 2) Bar
  2073. %    \end{tabular}
  2074. %    \begin{macrocode}
  2075. \newcounter{psnum}
  2076. \newcommand*{\ps}[1]
  2077.   {\stepcounter{psnum}
  2078.    \ifthenelse{\value{psnum}=1}
  2079.     {\def\@ps{#1}}
  2080.     {\ifthenelse{\value{psnum}=2}
  2081.       {\psname\space1.\ \@ps\\}
  2082.       {}
  2083.      \settowidth{\word}{\psname\space}
  2084.      \hspace*{\word}\the\value{psnum}.\ #1\\}}
  2085. %    \end{macrocode}
  2086. % \end{macro}
  2087. % \end{macro}
  2088. % \end{macro}
  2089. % \begin{macro}{\stopletter}
  2090. %     The |\stopletter| command is called by |\endletter| to do the
  2091. %     following:
  2092. %     Add any desired  fill  or other material at the end of the
  2093. %     letter.
  2094. %    \begin{macrocode}
  2095. \newcommand*{\stopletter}{}
  2096. %    \end{macrocode}
  2097. % \end{macro}
  2098. % \begin{macro}{\fromaddress}
  2099. %    The return address for the labels can be stored in this
  2100. %    macro.
  2101. %    \begin{macrocode}
  2102. \newcommand*{\fromaddress}
  2103.   {\fromname\space
  2104.    \fromstreet\space
  2105.    \fromlocation}
  2106. %    \end{macrocode}
  2107. % \end{macro}
  2108. % \subsection{Lists}
  2109. % \subsubsection{General List Parameters}
  2110. % The following commands are used to set the default values for the list
  2111. % environment's parameters. See the \LaTeX{} manual for an explanation
  2112. % of the meanings of the parameters.  Defaults for the list
  2113. % environment are set as follows.  First, |\rightmargin|,
  2114. % |\listparindent| and |\itemindent| are set to 0pt.  Then, for a Kth
  2115. % level list, the command |\@listK| is called, where `K' denotes `i',
  2116. % `i', ... , `vi'.  (I.e., |\@listiii| is called for a third-level
  2117. % list.)  By convention, |\@listK| should set |\leftmargin| to
  2118. % |\leftmarginK|.
  2119. % \begin{macro}{\leftmargin}
  2120. % \begin{macro}{\leftmargini}
  2121. % \begin{macro}{\leftmarginii}
  2122. % \begin{macro}{\leftmarginiii}
  2123. % \begin{macro}{\leftmarginiv}
  2124. % \begin{macro}{\leftmarginv}
  2125. % \begin{macro}{\leftmarginvi}
  2126. % For efficiency, level-one list's values are defined at top level, and
  2127. % |\@listi| is defined to set only |\leftmargin|.
  2128. %    \begin{macrocode}
  2129. \setlength\leftmargini  {2.5em}
  2130. %    \end{macrocode}
  2131. %    The following three are calculated so  that they are larger than
  2132. %    the sum of |\labelsep| and the width of the default labels (which
  2133. %    are `(m)', `vii.' and `M.').
  2134. %    \begin{macrocode}
  2135. \setlength\leftmarginii  {2.2em}
  2136. \setlength\leftmarginiii {1.87em}
  2137. \setlength\leftmarginiv  {1.7em}
  2138. \setlength\leftmarginv  {1em}
  2139. \setlength\leftmarginvi {1em}
  2140. %    \end{macrocode}
  2141. %    Here we set the top level leftmargin.
  2142. %    \begin{macrocode}
  2143. \setlength\leftmargin    {\leftmargini}
  2144. %    \end{macrocode}
  2145. % \end{macro}
  2146. % \end{macro}
  2147. % \end{macro}
  2148. % \end{macro}
  2149. % \end{macro}
  2150. % \end{macro}
  2151. % \end{macro}
  2152. % \begin{macro}{\labelsep}
  2153. % \begin{macro}{\labelwidth}
  2154. %    |\labelsep| is the distance between the label and the text of an
  2155. %    item; |\labelwidth| is the width of the label.
  2156. %    \begin{macrocode}
  2157. \setlength  \labelsep  {5\p@}
  2158. \setlength  \labelwidth{\leftmargini}
  2159. \addtolength\labelwidth{-\labelsep}
  2160. %    \end{macrocode}
  2161. % \end{macro}
  2162. % \end{macro}
  2163. % \begin{macro}{\partopsep}
  2164. %    When the user leaves a blank line before the environment an extra
  2165. %    vertical space of |\partopsep| is inserted, in addition to
  2166. %    |\parskip| and |\topsep|.
  2167. %    \begin{macrocode}
  2168. %<10pt>\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
  2169. %<11pt>\setlength\partopsep{3\p@ \@plus 1\p@ \@minus 1\p@}
  2170. %<12pt>\setlength\partopsep{3\p@ \@plus 2\p@ \@minus 2\p@}
  2171. %    \end{macrocode}
  2172. % \end{macro}
  2173. % \begin{macro}{\@beginparpenalty}
  2174. % \begin{macro}{\@endparpenalty}
  2175. %    These penalties are inserted before and after a list or paragraph
  2176. %    environment. They are set to a bonus value to encourage page
  2177. %    breaking at these points.
  2178. % \begin{macro}{\@itempenalty}
  2179. %    This penalty is inserted between list items.
  2180. %    \begin{macrocode}
  2181. \@beginparpenalty -\@lowpenalty
  2182. \@endparpenalty   -\@lowpenalty
  2183. \@itempenalty     -\@lowpenalty
  2184. %    \end{macrocode}
  2185. % \end{macro}
  2186. % \end{macro}
  2187. % \end{macro}
  2188. % \begin{macro}{\@listI}
  2189. % \begin{macro}{\@listi}
  2190. % |\@listI| defines top level and |\@listi| values of
  2191. % |\leftmargin|, |\parsep|, |\topsep|, and |\itemsep|
  2192. %    \begin{macrocode}
  2193. %<*10pt|11pt|12pt>
  2194. \def\@listI{\leftmargin\leftmargini
  2195. %<*10pt>    
  2196.             \parsep 4\p@ \@plus2\p@ \@minus\p@
  2197.             \topsep 8\p@ \@plus2\p@ \@minus4\p@
  2198.             \itemsep4\p@ \@plus2\p@ \@minus\p@}
  2199. %</10pt>            
  2200. %<*11pt>            
  2201.             \parsep 4.5\p@ \@plus2\p@ \@minus\p@
  2202.             \topsep 9\p@   \@plus3\p@ \@minus5\p@
  2203.             \itemsep4.5\p@ \@plus2\p@ \@minus\p@}
  2204. %</11pt>            
  2205. %<*12pt>            
  2206.             \parsep 5\p@  \@plus2.5\p@ \@minus\p@
  2207.             \topsep 10\p@ \@plus4\p@   \@minus6\p@
  2208.             \itemsep5\p@  \@plus2.5\p@ \@minus\p@}
  2209. %</12pt>
  2210. \let\@listi\@listI
  2211. %    \end{macrocode}
  2212. %    We have to initialize these parameters.
  2213. %    \begin{macrocode}
  2214. \@listi
  2215. %    \end{macrocode}
  2216. % \end{macro}
  2217. % \end{macro}
  2218. % \begin{macro}{\@listii}
  2219. % \begin{macro}{\@listiii}
  2220. % \begin{macro}{\@listiv}
  2221. % \begin{macro}{\@listv}
  2222. % \begin{macro}{\@listvi}
  2223. %    Here are the same macros for the higher level lists.
  2224. %    \begin{macrocode}
  2225. \def\@listii {\leftmargin\leftmarginii
  2226.               \labelwidth\leftmarginii
  2227.               \advance\labelwidth-\labelsep
  2228. %<*10pt>
  2229.               \topsep    4\p@ \@plus2\p@ \@minus\p@
  2230.               \parsep    2\p@ \@plus\p@  \@minus\p@
  2231. %</10pt>                 
  2232. %<*11pt>                 
  2233.               \topsep    4.5\p@ \@plus2\p@ \@minus\p@
  2234.               \parsep    2\p@   \@plus\p@  \@minus\p@
  2235. %</11pt>                 
  2236. %<*12pt>                 
  2237.               \topsep    5\p@   \@plus2.5\p@ \@minus\p@
  2238.               \parsep    2.5\p@ \@plus\p@    \@minus\p@
  2239. %</12pt>                 
  2240.               \itemsep   \parsep}
  2241. \def\@listiii{\leftmargin\leftmarginiii
  2242.               \labelwidth\leftmarginiii
  2243.               \advance\labelwidth-\labelsep
  2244. %<10pt>              \topsep    2\p@ \@plus\p@\@minus\p@
  2245. %<11pt>              \topsep    2\p@ \@plus\p@\@minus\p@
  2246. %<12pt>              \topsep    2.5\p@\@plus\p@\@minus\p@
  2247.               \parsep    \z@
  2248.               \partopsep \p@ \@plus\z@ \@minus\p@
  2249.               \itemsep   \topsep}
  2250. \def\@listiv {\leftmargin\leftmarginiv
  2251.               \labelwidth\leftmarginiv
  2252.               \advance\labelwidth-\labelsep}
  2253. \def\@listv  {\leftmargin\leftmarginv
  2254.               \labelwidth\leftmarginv
  2255.               \advance\labelwidth-\labelsep}
  2256. \def\@listvi {\leftmargin\leftmarginvi
  2257.               \labelwidth\leftmarginvi
  2258.               \advance\labelwidth-\labelsep}
  2259. %</10pt|11pt|12pt>
  2260. %    \end{macrocode}
  2261. % \end{macro}
  2262. % \end{macro}
  2263. % \end{macro}
  2264. % \end{macro}
  2265. % \end{macro}
  2266. % \subsubsection{Enumerate}
  2267. %    The enumerate environment uses  four counters: \Lcount{enumi},
  2268. %    \Lcount{enumii}, \Lcount{enumiii} and \Lcount{enumiv}, where
  2269. %    \Lcount{enumN} controls the numbering of the Nth level
  2270. %    enumeration.
  2271. % \begin{macro}{\theenumi}
  2272. % \begin{macro}{\theenumii}
  2273. % \begin{macro}{\theenumiii}
  2274. % \begin{macro}{\theenumiv}
  2275. %    The counters are already defined in \file{latex.tex}, but their
  2276. %    representation is changed here.
  2277. %    \begin{macrocode}
  2278. \renewcommand\theenumi{\arabic{enumi}}
  2279. \renewcommand\theenumii{\alph{enumii}}
  2280. \renewcommand\theenumiii{\roman{enumiii}}
  2281. \renewcommand\theenumiv{\Alph{enumiv}}
  2282. %    \end{macrocode}
  2283. % \end{macro}
  2284. % \end{macro}
  2285. % \end{macro}
  2286. % \end{macro}
  2287. % \begin{macro}{\labelenumi}
  2288. % \begin{macro}{\labelenumii}
  2289. % \begin{macro}{\labelenumiii}
  2290. % \begin{macro}{\labelenumiv}
  2291. %    The commands |\labelenumi| ... |\labelenumiv| generate the label
  2292. %    for each item.
  2293. %    \begin{macrocode}
  2294. \newcommand\labelenumi{\theenumi.}
  2295. \newcommand\labelenumii{(\theenumii)}
  2296. \newcommand\labelenumiii{\theenumiii.}
  2297. \newcommand\labelenumiv{\theenumiv.}
  2298. %    \end{macrocode}
  2299. % \end{macro}
  2300. % \end{macro}
  2301. % \end{macro}
  2302. % \end{macro}
  2303. % \begin{macro}{\p@enumii}
  2304. % \begin{macro}{\p@enumiii}
  2305. % \begin{macro}{\p@enumiv}
  2306. %    The expansion of |\p@enumN||\theenumN| defines the output of a
  2307. %    |\ref| command when referencing an item of the Nth level of an
  2308. %    enumerated list.
  2309. %    \begin{macrocode}
  2310. \renewcommand\p@enumii{\theenumi}
  2311. \renewcommand\p@enumiii{\theenumi(\theenumii)}
  2312. \renewcommand\p@enumiv{\p@enumiii\theenumiii}
  2313. %    \end{macrocode}
  2314. % \end{macro}
  2315. % \end{macro}
  2316. % \end{macro}
  2317. % \subsubsection{Itemize}
  2318. % \begin{macro}{\labelitemi}
  2319. % \begin{macro}{\labelitemii}
  2320. % \begin{macro}{\labelitemiii}
  2321. % \begin{macro}{\labelitemiv}
  2322. % Itemization is controlled by  |\labelitemi|,
  2323. % |\labelitemii|, |\labelitemiii|, and |\labelitemiv|, which define
  2324. % the labels of the various itemization levels: the symbols used are
  2325. % bullet, bold en-dash, asterisk and centered dot.
  2326. %    \begin{macrocode}
  2327. \newcommand\labelitemi{$\m@th\bullet$}
  2328. \newcommand\labelitemii{\normalfont\bfseries --}
  2329. \newcommand\labelitemiii{$\m@th\ast$}
  2330. \newcommand\labelitemiv{$\m@th\cdot$}
  2331. %    \end{macrocode}
  2332. % \end{macro}
  2333. % \end{macro}
  2334. % \end{macro}
  2335. % \end{macro}
  2336. % \subsubsection{Description}
  2337. % \begin{environment}{description}
  2338. %    The description environment is defined here -- while the itemize
  2339. %    and enumerate environments are defined in \file{latex.tex}.
  2340. %    \begin{macrocode}
  2341. \newenvironment{description}
  2342.                {\list{}{\labelwidth\z@ \itemindent-\leftmargin
  2343.                         \let\makelabel\descriptionlabel}}
  2344.                {\endlist}
  2345. %    \end{macrocode}
  2346. % \end{environment}
  2347. % \begin{macro}{\descriptionlabel}
  2348. %    To change the formatting of the label, you must redefine
  2349. %    |\descriptionlabel|.
  2350. %    \begin{macrocode}
  2351. \newcommand\descriptionlabel[1]{\hspace\labelsep
  2352.                                 \normalfont\bfseries #1}
  2353. %    \end{macrocode}
  2354. % \end{macro}
  2355. % \subsection{Defining new environments}
  2356. % \subsubsection{Verse}
  2357. % \begin{environment}{verse}
  2358. %   The verse environment is defined by making clever use of the
  2359. %   list environment's parameters.  The user types |\\| to end a line.
  2360. %   This is implemented by |\let|'ing |\\| equal |\@centercr|.
  2361. %    \begin{macrocode}
  2362. \newenvironment{verse}
  2363.                {\let\\=\@centercr
  2364.                 \list{}{\setlength\itemsep{\z@}%
  2365.                         \setlength\itemindent{-15\p@}%
  2366.                         \setlength\listparindent{\itemindent}%
  2367.                         \setlength\rightmargin{\leftmargin}%
  2368.                         \addtolength\leftmargin{15\p@}}%
  2369.                 \item[]}
  2370.                {\endlist}
  2371. %    \end{macrocode}
  2372. % \end{environment}
  2373. % \subsubsection{Quotation}
  2374. % \begin{environment}{quotation}
  2375. %   The quotation environment is also defined by making clever use of
  2376. %   the list environment's parameters. The lines in the environment
  2377. %   are set smaller than |\textwidth|. The first line of a paragraph
  2378. %   inside this environment is indented.
  2379. %    \begin{macrocode}
  2380. \newenvironment{quotation}
  2381.                {\list{}{\setlength\listparindent{1.5em}%
  2382.                         \setlength\itemindent{\listparindent}%
  2383.                         \setlength\rightmargin{\leftmargin}}%
  2384.                 \item[]}
  2385.                {\endlist}
  2386. %    \end{macrocode}
  2387. % \end{environment}
  2388. % \subsubsection{Quote}
  2389. % \begin{environment}{quote}
  2390. %   The quote environment is like the quotation environment except
  2391. %   that paragraphs are not indented.
  2392. %    \begin{macrocode}
  2393. \newenvironment{quote}
  2394.                {\list{}{\setlength\rightmargin{\leftmargin}}%
  2395.                 \item[]}
  2396.                {\endlist}
  2397. %    \end{macrocode}
  2398. % \end{environment}
  2399. % \subsubsection{Theorem}
  2400. %    This document class does not define it's own theorem environments,
  2401. %    the defaults, supplied by \file{latex.ltx} are available.
  2402. % \subsection{Setting parameters for existing environments}
  2403. % \subsubsection{Array and tabular}
  2404. % \begin{macro}{\arraycolsep}
  2405. %    The columns in an array environment are separated by
  2406. %    2|\arraycolsep|.
  2407. %    \begin{macrocode}
  2408. \setlength\arraycolsep{5\p@}
  2409. %    \end{macrocode}
  2410. % \end{macro}
  2411. % \begin{macro}{\tabcolsep}
  2412. %    The columns in an tabular environment are separated by
  2413. %    2|\tabcolsep|.
  2414. %    \begin{macrocode}
  2415. \setlength\tabcolsep{6\p@}
  2416. %    \end{macrocode}
  2417. % \end{macro}
  2418. % \begin{macro}{\arrayrulewidth}
  2419. %    The width of vertical rules in the array and tabular environments
  2420. %    is given by |\arrayrulewidth|.
  2421. %    \begin{macrocode}
  2422. \setlength\arrayrulewidth{.4\p@}
  2423. %    \end{macrocode}
  2424. % \end{macro}
  2425. % \begin{macro}{\doublerulesep}
  2426. %    The space between adjacent rules in the array and tabular
  2427. %    environments is given by |\doublerulesep|.
  2428. %    \begin{macrocode}
  2429. \setlength\doublerulesep{2\p@}
  2430. %    \end{macrocode}
  2431. % \end{macro}
  2432. % \subsubsection{Tabbing}
  2433. % \begin{macro}{\tabbingsep}
  2434. %    This controls the space that the |\'| command puts in. (See
  2435. %    \LaTeX{} manual for an explanation.)
  2436. %    \begin{macrocode}
  2437. \setlength\tabbingsep{\labelsep}
  2438. %    \end{macrocode}
  2439. % \end{macro}
  2440. % \subsubsection{Minipage}
  2441. % \begin{macro}{\@minipagerestore}
  2442. %    The macro |\@minipagerestore| is called upon entry to a minipage
  2443. %    environment to set up things that are to be handled differently
  2444. %    inside a minipage environment. In the current styles, it does
  2445. %    nothing.
  2446. % \end{macro}
  2447. % \begin{macro}{\@mpfootins}
  2448. %    Minipages have their own footnotes; |\skip||\@mpfootins| plays
  2449. %    same r\^ole for footnotes in a minipage as |\skip||\footins| does
  2450. %    for ordinary footnotes.
  2451. %    \begin{macrocode}
  2452. \skip\@mpfootins = \skip\footins
  2453. %    \end{macrocode}
  2454. % \end{macro}
  2455. % \subsubsection{Framed boxes}
  2456. % \begin{macro}{\fboxsep}
  2457. %    The space left by |\fbox| and |\framebox| between the box and the
  2458. %    text in it.
  2459. % \begin{macro}{\fboxrule}
  2460. %    The width of the rules in the box made by |\fbox| and |\framebox|.
  2461. %    \begin{macrocode}
  2462. \setlength\fboxsep{3\p@}
  2463. \setlength\fboxrule{.4\p@}
  2464. %    \end{macrocode}
  2465. % \end{macro}
  2466. % \end{macro}
  2467. % \subsubsection{Equation and eqnarray}
  2468. % \begin{macro}{\theequation}
  2469. %    The equation counter will be typeset using arabic numbers.
  2470. %    \begin{macrocode}
  2471. \renewcommand\theequation{\arabic{equation}}
  2472. %    \end{macrocode}
  2473. % \end{macro}
  2474. % \begin{macro}{\jot}
  2475. %    |\jot| is the extra space added between lines of an eqnarray
  2476. %    environment. The default value is used.
  2477. %    \begin{macrocode}
  2478. % \setlength\jot{3pt}
  2479. %    \end{macrocode}
  2480. % \end{macro}
  2481. % \begin{macro}{\@eqnnum}
  2482. %    The macro |\@eqnnum| defines how equation numbers are to appear in
  2483. %    equations. Again the default is used.
  2484. %    \begin{macrocode}
  2485. % \def\@eqnnum{(\theequation)}
  2486. %    \end{macrocode}
  2487. % \end{macro}
  2488. % \subsection{Font changing}
  2489. %    Here we supply the declarative font changing commands that were
  2490. %    common in \LaTeX\ version 2.09 and earlier. These commands work
  2491. %    in text mode \emph{and} in math mode. They are provided for
  2492. %    compatibility, but one should start using the |\text...| and
  2493. %    |\math...| commands instead. These commands are redefined using
  2494. %    |\@renewfontswitch|, a command with three arguments: the user
  2495. %    command to be defined; \LaTeX\ commands to execute in text mode
  2496. %    and \LaTeX\ commands to execute in math mode.
  2497. %  \begin{macro}{\rm}
  2498. %  \begin{macro}{\tt}
  2499. %  \begin{macro}{\sf}
  2500. %    The commands to change the family.
  2501. %    \begin{macrocode}
  2502. \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
  2503. \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
  2504. \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
  2505. %    \end{macrocode}
  2506. %  \end{macro}
  2507. %  \end{macro}
  2508. %  \end{macro}
  2509. %  \begin{macro}{\bf}
  2510. %    The command to change to the bold series. One should use
  2511. %    |\mdseries| to explicitly switch back to medium series.
  2512. %    \begin{macrocode}
  2513. \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
  2514. %    \end{macrocode}
  2515. %  \end{macro}
  2516. %  \begin{macro}{\sl}
  2517. %  \begin{macro}{\it}
  2518. %  \begin{macro}{\sc}
  2519. %    And the commands to change the shape of the font. The slanted and
  2520. %    small caps shapes are not available by default as math alphabets,
  2521. %    so those changes do nothing in math mode. One should use
  2522. %    |\upshape| to explicitly change back to the upright shape.
  2523. %    \begin{macrocode}
  2524. \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
  2525. \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\relax}
  2526. \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\relax}
  2527. %    \end{macrocode}
  2528. %  \end{macro}
  2529. %  \end{macro}
  2530. %  \end{macro}
  2531. % \begin{macro}{\cal}
  2532. % \begin{macro}{\mit}
  2533. %    The commands |\cal| and |\mit| should only be used in math mode,
  2534. %    outside math mode they have no effect. Currently the New Font
  2535. %    Selection Scheme defines these commands to generate warning
  2536. %    messages. Therefore we have to define them `by hand'.
  2537. %    \begin{macrocode}
  2538. \DeclareRobustCommand*{\cal}{\@fontswitch{\relax}{\mathcal}}
  2539. \DeclareRobustCommand*{\mit}{\@fontswitch{\relax}{\mathnormal}}
  2540. %    \end{macrocode}
  2541. %  \end{macro}
  2542. %  \end{macro}
  2543. % \subsection{Footnotes}
  2544. % \begin{macro}{\footnoterule}
  2545. %    Usually, footnotes are separated from the main body of the text
  2546. %    by a small rule. This rule is drawn by the macro |\footnoterule|.
  2547. %    We have to make sure that the rule takes no vertical space (see
  2548. %    \file{plain.tex}) so we compensate for the natural height of the
  2549. %    rule of 0.4pt by adding the right amount of vertical skip.
  2550. %    To prevent the rule from colliding with the footnote we first add
  2551. %    a little negative vertical skip, then we put the rule and make
  2552. %    sure we end up at the same point where we begun this operation.
  2553. %    \begin{macrocode}
  2554. \renewcommand\footnoterule{%
  2555.   \kern-\p@
  2556.   \hrule \@width .4\columnwidth
  2557.   \kern .6\p@}
  2558. %    \end{macrocode}
  2559. % \end{macro}
  2560. % \begin{macro}{\c@footnote}
  2561. %    A counter for footnotes.
  2562. %    \begin{macrocode}
  2563. % \newcounter{footnote}
  2564. %    \end{macrocode}
  2565. % \end{macro}
  2566. % \begin{macro}{\@makefntext}
  2567. %    The footnote mechanism of \LaTeX{} calls the macro |\@makefntext|
  2568. %    to produce the actual footnote. The macro gets the text of the
  2569. %    footnote as its argument and should use |\@makefnmark| to produce
  2570. %    the mark of the footnote. The macro |\@makefntext| is called when
  2571. %    effectively inside a |\parbox| of width |\columnwidth| (i.e.,
  2572. %    with |\hsize| = |\columnwidth|).
  2573. %   An example of what can be achieved is given by the following piece
  2574. %   of \TeX\ code.
  2575. % \begin{verbatim}
  2576. %          \long\def\@makefntext#1{%
  2577. %             \@setpar{\@@par
  2578. %                      \@tempdima = \hsize
  2579. %                      \advance\@tempdima-10pt
  2580. %                      \parshape \@ne 10pt \@tempdima}%
  2581. %             \par
  2582. %             \parindent 1em\noindent
  2583. %             \hbox to \z@{\hss\@makefnmark}#1}
  2584. % \end{verbatim}
  2585. %    The effect of this definition is that all lines of the footnote
  2586. %    are indented by 10pt, while the first line of a new paragraph is
  2587. %    indented by 1em. To change these dimensions, just substitute the
  2588. %    desired value for `10pt' (in both places) or `1em'.  The mark is
  2589. %    flush right against the footnote.
  2590. %    In these document class we use a simpler macro, in which the
  2591. %    footnote text is set like an ordinary text paragraph, with no
  2592. %    indentation except on the first line of a paragraph, and the
  2593. %    first line of the footnote. Thus, all the macro must do is set
  2594. %    |\parindent| to the appropriate value for succeeding paragraphs
  2595. %    and put the proper indentation before the mark.
  2596. %    \begin{macrocode}
  2597. \long\def\@makefntext#1{%
  2598.     \noindent
  2599.     \hangindent 5\p@
  2600.     \hbox to5\p@{\hss\@makefnmark}#1}
  2601. %    \end{macrocode}
  2602. % \end{macro}
  2603. % \begin{macro}{\@makefnmark}
  2604. %    The footnote markers that are printed in the text to point to the
  2605. %    footnotes should be produced by the macro |\@makefnmark|. We use
  2606. %    the default definition for it.
  2607. %    \begin{macrocode}
  2608. %\def\@makefnmark{\hbox{$^{\@thefnmark}\m@th$}}
  2609. %    \end{macrocode}
  2610. % \end{macro}
  2611. % \subsection{Two column mode}
  2612. % \begin{macro}{\columnsep}
  2613. %    This gives the distance between two columns in two column mode.
  2614. %    \begin{macrocode}
  2615. \setlength\columnsep{10\p@}
  2616. %    \end{macrocode}
  2617. % \end{macro}
  2618. % \begin{macro}{\columnseprule}
  2619. %    This gives the width of the rule between two columns in two
  2620. %    column mode. We have no visible rule.
  2621. %    \begin{macrocode}
  2622. \setlength\columnseprule{0\p@}
  2623. %    \end{macrocode}
  2624. % \end{macro}
  2625. % \subsection{The page style}
  2626. %    We have \pstyle{empty} pages in this document class by
  2627. %    default. We use arabic page numbers.
  2628. %    \begin{macrocode}
  2629. \pagestyle{empty}
  2630. \pagenumbering{arabic}
  2631. %    \end{macrocode}
  2632. % \subsection{Single or double sided printing}
  2633. %    We don't try to make each page as long as all the others.
  2634. %    \begin{macrocode}
  2635. \raggedbottom
  2636. %    \end{macrocode}
  2637. % \begin{macro}{\@texttop}
  2638. %    The document class letter sets |\@texttop| to |\vskip| 0pt plus
  2639. %    .00006fil on the first page of a letter, which centers a short
  2640. %    letter on the page. This fil value may have to be changed for
  2641. %    other letterheads.  This setting has to be done after
  2642. %    |\raggedbottom| is executed, since the latter sets |\@texttop| to
  2643. %    |\relax|.
  2644. %    \begin{macrocode}
  2645. \def\@texttop{\ifnum\c@page=1\vskip \z@ plus.00006fil\relax\fi}
  2646. %    \end{macrocode}
  2647. % \end{macro}
  2648. %    We always start in one column mode.
  2649. %    \begin{macrocode}
  2650. \onecolumn
  2651. %</lettGF>
  2652. %    \end{macrocode}
  2653. % \section{External options to the standard document classes}
  2654. % \subsection{Left equation numbering}
  2655. %  \begin{macro}{\@eqnnum}
  2656. %    To put the equation number on the left side of an equation we
  2657. %    have to use a little trick. The number is shifted |\displaywidth|
  2658. %    to the left inside a box of (approximately) zero width. This
  2659. %    fails when the quation is too wide, the equation number than may
  2660. %    overprint the equation itself.
  2661. %    \begin{macrocode}
  2662. %<*leqno>
  2663. \renewcommand{\@eqnnum}{\hbox to .01\p@{}%
  2664.                       \rlap{\reset@font\rmfamily
  2665.                         \hskip -\displaywidth(\theequation)}}
  2666. %</leqno>
  2667. %    \end{macrocode}
  2668. %  \end{macro}
  2669. % \subsection{Flush left equations}
  2670. %    To get the displayed math environments to print the contents
  2671. %    flush left (with an indentation) we have to redefine all of
  2672. %    \LaTeXe's displayed math environments.
  2673. %  \begin{macro}{\mathindent}
  2674. %    The amount of indentation of the equations is stored in a register.
  2675. %    \begin{macrocode}
  2676. %<*fleqn>
  2677. \newdimen\mathindent
  2678. %    \end{macrocode}
  2679. %    The setting of |\mathindent| has to be deferred until the class
  2680. %    file has been processed, because |\leftmargini| is still 0pt
  2681. %    wide at the moment \file{fleqn.clo} is read in.
  2682. %    \begin{macrocode}
  2683. \AtEndOfClass{\mathindent\leftmargini}
  2684. %    \end{macrocode}
  2685. % \end{macro}
  2686. %  \begin{macro}{\[}
  2687. %    Begin display math;
  2688. %    \begin{macrocode}
  2689. \renewcommand{\[}{\relax
  2690.                  \ifmmode\@badmath
  2691.                  \else
  2692.                    \begin{trivlist}%
  2693.                      \@beginparpenalty\predisplaypenalty
  2694.                      \@endparpenalty\postdisplaypenalty
  2695.                      \item[]\leavevmode
  2696.                      \hbox to\linewidth\bgroup $\m@th\displaystyle %$
  2697.                        \hskip\mathindent\bgroup
  2698.                  \fi}
  2699. %    \end{macrocode}
  2700. % \end{macro}
  2701. %  \begin{macro}{\]}
  2702. %    end display math;
  2703. %    \begin{macrocode}
  2704. \renewcommand{\]}{\relax
  2705.                  \ifmmode
  2706.                        \egroup $\hfil% $
  2707.                      \egroup
  2708.                    \end{trivlist}%
  2709.                  \else \@badmath
  2710.                  \fi}
  2711. %    \end{macrocode}
  2712. % \end{macro}
  2713. %  \begin{environment}{equation}
  2714. %    The \textsf{equation} environment
  2715. %    \begin{macrocode}
  2716. \renewenvironment{equation}%
  2717.     {\@beginparpenalty\predisplaypenalty
  2718.      \@endparpenalty\postdisplaypenalty
  2719.      \refstepcounter{equation}%
  2720.      \trivlist \item[]\leavevmode
  2721.        \hbox to\linewidth\bgroup $\m@th% $
  2722.          \displaystyle
  2723.          \hskip\mathindent}%
  2724.         {$\hfil % $
  2725.          \displaywidth\linewidth\hbox{\@eqnnum}%
  2726.        \egroup
  2727.      \endtrivlist}
  2728. %    \end{macrocode}
  2729. % \end{environment}
  2730. % \begin{environment}{eqnarray}
  2731. %    The \textsf{eqnarray} environment
  2732. %    \begin{macrocode}
  2733. \renewenvironment{eqnarray}{%
  2734.     \stepcounter{equation}%
  2735.     \def\@currentlabel{\p@equation\theequation}%
  2736.     \global\@eqnswtrue\m@th
  2737.     \global\@eqcnt\z@
  2738.     \tabskip\mathindent
  2739.     \let\\=\@eqncr
  2740.     \setlength{\abovedisplayskip}{\topsep}%
  2741.     \ifvmode
  2742.       \addtolength{\abovedisplayskip}{\partopsep}%
  2743.     \fi
  2744. %    \end{macrocode}
  2745. %    When the documentclass uses a non-zero |\parskip| setting the
  2746. %    |\topsep| might have a negative value to compensate for
  2747. %    that. Therefor we add |\parskip| to |\abovedisplayskip|.
  2748. %    \begin{macrocode}
  2749.     \addtolength{\abovedisplayskip}{\parskip}%
  2750.     \setlength{\belowdisplayskip}{\abovedisplayskip}%
  2751.     \setlength{\belowdisplayshortskip}{\abovedisplayskip}%
  2752.     \setlength{\abovedisplayshortskip}{\abovedisplayskip}%
  2753.     $$\everycr{}\halign to\linewidth% $$
  2754.     \bgroup
  2755.       \hskip\@centering
  2756.       $\displaystyle\tabskip\z@skip{##}$\@eqnsel&%
  2757.       \global\@eqcnt\@ne \hskip \tw@\arraycolsep \hfil${##}$\hfil&%
  2758.       \global\@eqcnt\tw@ \hskip \tw@\arraycolsep
  2759.         $\displaystyle{##}$\hfil \tabskip\@centering&%
  2760.       \global\@eqcnt\thr@@
  2761.         \hbox to \z@\bgroup\hss##\egroup\tabskip\z@skip\cr}%
  2762.       {\@@eqncr
  2763.     \egroup
  2764.     \global\advance\c@equation\m@ne$$% $$
  2765.     \global\@ignoretrue
  2766.     }
  2767. %</fleqn>
  2768. %    \end{macrocode}
  2769. % \end{environment}
  2770. % \Finale
  2771. \endinput
  2772. % End of file `lettGF.cls'.
  2773.